HTML5 Application Cache always caches your home page

I built a mobile site for a client. One of the neat features is the ability to customize a secondary view of the home page.

When I went to add a cache manifest to the site (so that images, styles, and static pages could be viewed offline) I found that the application cache wouldn’t let go of the stored home page with its custom view, in spite of my having listed it in the online whitelist section of my cache manifest.

I think that this comment from the spec describes it:

“… in practice the page that referenced the manifest is automatically cached.”

It doesn’t explain why that is the case, but apparently it is. That tells me two things:

  1. Any customizations to the home page should be handled via AJAX, or better yet, be handled on a page other than the home page, and
  2. The manifest attribute of the HTML tag should probably only be included on the home page (or any other likely landing pages) — and not on every page of the site, as I had built it originally.
Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s