HTML5 - cache manifest working great on Chrome but not on Firefox and Opera

后端 未结 13 1365
挽巷
挽巷 2020-12-15 17:55

I am developing a web app for offline use, thus I need to use the application cache functionality.

Everything works great on Chrome (15.0.874.106) but is doesn\'t wo

13条回答
  •  余生分开走
    2020-12-15 18:34

    Try removing:

    header("Cache-Control: max-age=0, no-cache, no-store, must-revalidate");
    header("Pragma: no-cache");
    header("Expires: Wed, 11 Jan 1984 05:00:00 GMT");
    

    so that you are only sending the Content-type header:

    
    

    ApplicationCache forces caching (oversimplifying, but not by much). Those first three headers are ways to prevent caching.

    Opera appears to prevent caching when those headers are present. Firefox' debugging tools are a bit wonky when it comes to debugging AppCache, but it's probably save to assume this will fix it there as well.

提交回复
热议问题