DEV Community

Posted on • Updated on

HTML : App Cache [deprecated]

With app cache it is easy to make an offline version of a web application, by creating a cache manifest file.

What is App Cache?

HTML5 introduces application cache, which means that a web application is cached, and accessible without an internet connection.


  • Offline browsing - users can use the application when they're offline
  • Speed - cached resources load faster
  • Reduced server load - the browser will only download updated/changed resources from the server

How to enable app cache?

To enable application cache, include the manifest attribute in the document's tag:

<html manifest="index.appcache">
Enter fullscreen mode Exit fullscreen mode

Basic Example of HTML5 cache

This is our index.html file -

<!DOCTYPE html>
<html manifest="index.appcache">
Enter fullscreen mode Exit fullscreen mode

then we will create index.appcache file with below codes

Enter fullscreen mode Exit fullscreen mode

write those files that you want to be cached load index.html then go for offline mode and reload the tab.

Note: The two files must be in the same folder in this example.

More details can be found at -

Unfortunately this feature is in progress of being deprecated so please do not use for your upcoming projects

Buy Me A Coffee

With all that being said, I highly recommend you keep learning!

Thank you for reading this article. Please feel free to connect with me on LinkedIn and Twitter.

Top comments (5)

rajeshkumaryadavdotcom profile image • Edited

Thanks Raghav, I already have mentioned this method is deprecated and this article is just for information only and we should not use app cache to our current and upcoming projects.

ike5 profile image
Ike Maldonado

That's too bad that it's been deprecated. What other alternatives do we have?

rajeshkumaryadavdotcom profile image

This could have been more useful but deprecated.