HTML 5 Appcache works in safari/opera/chrome but not firefox

前端 未结 7 1365
花落未央
花落未央 2020-12-06 06:04

I have an html5 appcache running on a website, it works fine in Safari, Opera and Chrome but it fails to work on Firefox.

I have the following in my code:

         


        
相关标签:
7条回答
  • 2020-12-06 06:55

    I had a similar problem. The problem was that FireFox cache file more aggressively, so I had to add these headers:

    For the manifest:

    Pragma: no-cache
    Cache-Control: no-cache
    Expires: date
    

    And for the files:

    Last-Modified: date
    Cache-Control: no-cache
    Expires: date
    

    Replace date by the RFC 1123 formated current date.

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