Mark Greenwood Team : Web Development Tags : Web Development

HTML5 Application Cache

Mark Greenwood Team : Web Development Tags : Web Development

Browsers can cache pages and resources for extended periods if instructed to do so. Unfortunately they tend to kick out items at any point to make room for other things. HTML5 attempts to address this issue with the Application Cache.

What is Application Cache?

HTML5 introduces application cache. This means that a web application can be cached, and accessible without an internet connection!

Application cache has 4 main benefits:

  • 1. Offline browsing - No internet connection required.
  • 2. Speed - resources come from local storage.
  • 3. Reduced server load - only updated resources need be served.
  • 4. Resilience - If your site goes down, the user can still get an "offline" experience.

Careful!

Application cache has several gotchas to look out for:

  • 1. Even when you’re online, files always come from the Application Cache.
  • 2. The Application Cache works in tandem with your browser cache.
  • 3. Caching the manifest file itself can kill your site FOREVER!
  • 4. Resources that do not appear in the manifest will not appear in your cached page at all!

Browser Support:

  • Internet Explorer 10
  • Firefox
  • Chrome
  • Safari
  • Opera