Can I disable FF3 back button cache?

前端 未结 3 1266
轮回少年
轮回少年 2020-12-17 00:16

I found out that when pressing back button it gets previous page from browser cache even if I send following headers:

Test1.aspx

Server                       


        
相关标签:
3条回答
  • 2020-12-17 00:31

    Cache-control and such things only tell browser NOT to save in cache the downloaded stuff (js, css, images, etc.). It does not relate with the History of visited pages.

    You shouldn't try to modify browser's data. Instead, you'd handle events and stop the ones you don't want to happen in your site.

    0 讨论(0)
  • 2020-12-17 00:34

    expires should be a date+timestamp and cache-control"s "must-revalidata" & "max-age" might help as well?

    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    
    0 讨论(0)
  • 2020-12-17 00:46

    For me the following setting in the header worked:

    Pragma: no-cache

    Cache-Control: no-cache, no-store

    Expires: 0

    0 讨论(0)
提交回复
热议问题