Dieser Artikel wird mit Ihnen die Methode zur Erzwingung des Cache in ASP, HTML und JS teilen.
ASP
- Response.buffer = true
- Response.expiresabsolute = jetzt ()-1
- Response.expires = 0
- Response.cachecontrol = no-cache
- Response.addHeaderpragma, no-cache
Html
- <metahttp-äquiv = content-typecontent = text/html; charSet = gb2312/>
- <metahttp-äquiv = pragmacontent = no-cache>
- <metahttp-äquiv = cache-controlContent = no-cache>
- <metahttp-äquiv = expirescontent = 0>
JavaScript
Für JS können Sie einen zufälligen Parameter hinzufügen, nachdem Sie sich auf JS beziehen.
- <scriptType = text/javaScriptsrc = 'jscript.js? Rnd = 10092'>
Das obige ist der gesamte Inhalt dieses Artikels. Ich hoffe, es gefällt Ihnen.