How do I solve the leverage browser caching problem using an. Hatches file?

Knowledge BaseCategory: BrowserHow do I solve the leverage browser caching problem using an. Hatches file?
1 Answers
Ryan Jones answered 2 weeks ago

You must be light with your .htacess file if your web application works on HTML5.  You need to use the Manifest Application Caching to solve the leverage browser caching problem.

Doing the same by adding expire time for resources in the .htacess file is old school.

Follow the following steps:

1. Make a Manifest file, and mention all the files and resources that you want the browser to cache.

2. Include the <html manifest=”name_of_manifest_file”> tag on your Web pages.

3. Browser will cache all the files mentioned in the Manifest file.

4. If you want to make changes to the cached file, and want the browser to update those files, simply make a change in the manifest file, adding a comment would suffice.

5. The browser will pick the new files and cache them.

6. You must make sure your server serves the content type text/cache-manifest. If you have Apache server, add the following to your .htacess file

Your Answer

13 + 14 =