HTML页面刷新清除页面缓存

html-css011

HTML页面刷新清除页面缓存,第1张

JSP清理缓存的方法:

在jsp页里

<%response.setHeader("Pragma","No-cache")

response.setHeader("Cache-Control","no-cache")

response.setDateHeader("Expires", 0)

response.flushBuffer()%>

在html页里:

<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312">

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">

<META HTTP-EQUIV="Expires" CONTENT="0">

这种靠meta标签实现:

<meta http-equiv="Pragma" content="no-cache">

<meta http-equiv="Cache-Control" content="no-cache">

<meta http-equiv="Expires" content="0">

android开发,用webview打开本地html网页时,清除缓存的方法

在oncreate 加上 CookieSyncManager.createInstance(this)CookieSyncManager.getInstance().startSync() CookieManager.getInstance().removeSessionCookie()