• Hi,
    I have just read up on html5 app cache and wanted to ask whether it has any effect if i have already set certain caching in my .htaccess file.
    Does it help to add the following tag to each of the pages in my header.php file?
    <html manifest=”demo.appcache”>

    my .htaccess file looks like this:
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg “access 1 year”
    ExpiresByType image/jpeg “access 1 year”
    ExpiresByType image/gif “access 1 year”
    ExpiresByType image/png “access 1 year”
    ExpiresByType text/css “access 1 month”
    ExpiresByType application/pdf “access 1 month”
    ExpiresByType text/x-javascript “access 1 month”
    ExpiresByType application/x-shockwave-flash “access 1 month”
    ExpiresByType image/x-icon “access 1 year”
    ExpiresDefault “access 2 days”

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    appcache enables a browser to cache content for offline use, while the expiry headers set in .htaccess generally only speed the site up when you do have a connection. The .htaccess settings will not allow you to view the site when offline.

    Do note that appcache can be quite difficult to maintain. A more modern approach to making a site available offline is using Service Workers. This approach also seems more flexible and robust if you are heading down that way.

    If you simply want to speed the site up I suggest looking into a caching plugin like WP Supercache which takes care of not only the cache headers, but also page level caching. Another avenue to explore would be to use a CDN – Cloudflare provides a free one for small sites.

    Hope this helps

    Thread Starter haddlyapis

    (@haddlyapis)

    thx

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘html app cache when already have .htaccess’ is closed to new replies.