บทความนี้จะแบ่งปันวิธีการบังคับให้คุณไม่มีแคชใน ASP, HTML และ JS
งูเห่า
- response.buffer = true
- Response.expiresabsolute = Now ()-1
- Response.exext = 0
- Response.cacheControl = ไม่มีแคช
- Response.addheaderPragma ไม่มีแคช
HTML
- <metahttp-equiv = content-typecontent = text/html; charset = gb2312/>
- <metahttp-equiv = pragmacontent = no-cache>
- <metahttp-equiv = cache-controlContent = no-cache>
- <metahttp-equiv = expirescontent = 0>
จาวาสคริปต์
สำหรับ JS คุณสามารถเพิ่มพารามิเตอร์แบบสุ่มหลังจากอ้างถึง JS
- <scriptType = text/javascriptsrc = 'jscript.js? rnd = 10092'>
ข้างต้นเป็นเนื้อหาทั้งหมดของบทความนี้ฉันหวังว่าคุณจะชอบ