dreamweaver怎樣制作禁止頁面緩存

字號:


    dreamweaver提供了快速建立網(wǎng)站框架的方式,我們可以通過簡單預(yù)設(shè)模板來達(dá)到快速的架構(gòu)一個簡易網(wǎng)站的目的??纯聪旅孢@個網(wǎng)頁的基本結(jié)構(gòu),這是我們今天的目標(biāo),左側(cè)導(dǎo)航欄,右側(cè)顯示主頁面。
    今天在開發(fā)時碰到一種方法,就是客戶要求頁面不緩存,查了一下得出如下幾種不讓頁面緩存的辦法,有需要的朋友可以參考一下只要加在頭部就可以了
    代碼如下:
    asp教程做法
    代碼如下:
    response.buffer = true
    response.expiresabsolute = now() - 1
    response.expires = 0
    response.cachecontrol = no-cache
    response.addheader pragma, no-cache
    代碼如下:
    header('expires: mon, 26 jul 1997 05:00:00 gmt');
    header('last-modified: ' . gmdate('d, d m y h:i:s') . 'gmt');
    header('cache-control: no-cache, must-revalidate');
    header('pragma: no-cache');
    ?>
    還有一種更簡單的方法,就是大家ajax時用到的?mt=隨便數(shù)據(jù)