Once an HTML document has a manifest (cache.manifest), how can you remove it?

后端 未结 7 1103
别那么骄傲
别那么骄傲 2021-01-31 10:28

It seems that once you have a manifest entry, a la:


Then that page (the master entry in the cache) wil

7条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-31 11:09

    For development purposes (constant changes), what we have done is:

    1. Set a -cache manifest file- under your SERVER-SIDE language, for example, we use PHP, so our development cache is called "cache.manifest.php" and it's pointed this same way in the html tag like this:

      
      
    2. Put some -time dependent- string (or something else that suites you) somewhere in your manifest as a comment (#---), so that the file is different every once in a while (browsers seem to compare manifest's content, not date), for example this string changes the manifest every minute, this way all files would be re-cached if the visit is in a different minute as the last time.

      
      

    We've just tested this procedure using Chrome, hope it works in others, but if not your comments and advices would be very well appreciated.

提交回复
热议问题