0

I would like to configure my manifest file so that if a user visits the site while disconnected from the internet or they get disconnected while they are browsing, the next page they visit will be from the appcache. other wise if they ARE connected they will get served a fresh page.

1 Answer 1

1

If a given page is in the appcache, and assuming the cache has downloaded to your machine / device, whether you are connected or not, you will see the cached version of that page.

However, if that page is subsequently updated, you can be sure of the user seeing the latest version of it if you trigger an appcache update (i.e. by changing the byte signature of your manifest file). Thus you ensure that your connected users see the most up-to-date content, whilst disconnected users still have content to look at.

Sign up to request clarification or add additional context in comments.

2 Comments

It's dynamic content so it changes frequently, I have to manually update the manifest file each time? Is there a commonly used way people automate this?
Yes and yes :-) I don't know what environment you're developing in, but it should be pretty straightforward to integrate manifest file changes with your build process (for static sites), or have the manifest file update automatically on content changes (for CMS-driven sites)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.