About HTML5 Offline Storage

I have a few questions about HTML5 offline storage that I could not understand.

  • Where exactly are these files stored on Windows? I could not find here:

    C: \ Documents and Settings [Username] \ Application Data \ Mozilla \ Firefox \ Profiles \

  • Is there an expiration time after this browser automatically deletes these files? Or do files stay forever?

  • What should I do if I change the contents of the page, still updating the data that is stored offline?

Thanks.

+7
source share
2 answers
  • I found them in% AppData% / Profiles / <currentprofilename> .default / OfflineCache. I am using windows 7.

  • It depends on the expiration of the headers sent by your web server for the corresponding files. It is recommended that you set the expires header to one week, but it is up to you, you can make it never expire. Note that the manifest file itself must be configured to never be cached.

  • To update the data, you must actually modify the manifest file. It is recommended that somewhere in the manifest file you put a comment with the version number, and then update it every time you change any of your other files.

Edit: I answered these questions, thinking that you mean the standalone application cache, not the local storage.

+1
source

Well, in terms of accuracy, it should be mentioned that although localStorage was indeed part of the HTML5 specification, it was broken into its own after being a bit confused to be included with the rest of HTML5.

  • It really depends on your browser, but you need to find it in the AppData folder in / profiles // OfflineCache. (for Windoes 7).

  • As a rule, there is no expiration date for localStorage, it can remain forever, unless specifically deleted by the website.

  • Javascript modifies the local storage data (provided that you are not touching the actual file), in which case the website (or record) you are using must be smart enough to update localStorage along with the content page.

+1
source

All Articles