清除網(wǎng)頁(yè)緩存(html asp php java

字號(hào):


    代碼如下:
    html網(wǎng)頁(yè)
    <meta http-equiv=pragma content=no-cache>
    <meta http-equiv=cache-control content=no-cache, must-revalidate>
    <meta http-equiv=expires content=wed, 26 feb 1997 08:21:57 gmt>
    或者<meta http-equiv=expires content=0>
    asp網(wǎng)頁(yè)
    response.expires = -1
    response.expiresabsolute = now() - 1
    response.cachecontrol = no-cache
    php網(wǎng)頁(yè)
    header(expires: mon, 26 jul 1997 05:00:00 gmt);
    header(cache-control: no-cache, must-revalidate);
    header(pragma: no-cache);
    jsp網(wǎng)頁(yè)
    response.setheader(pragma, no-cache);
    response.setheader(cache-control, no-cache);
    response.setdateheader(expires, 1);