Browser cache is suppose to be used for the static files. However, some bad .htaccess rule often set aggresive TTL for the HTML document that is completely wrong and worst for user-experience.
Example of such rules… you may find in your .htaccess files.
ExpiresDefault "access plus 1 month"
ExpiresByType text/html "access 1 month"
This type of rule often being added by some stupid plugin… One of them, example is Breeze.
Even after multiple report, author don’t care at all.
How to check if your site is affected by long TTL browser cache policy?
- Check HTTP response header of the first HTTP request that is for HTML
If you see there is
- Try Pingdom, check first HTTP request response.
I don’t understand the logic, why they set 30 days cache for HTML. As it is dynamic form of request, suppose to be updated often.
How to fix?
First check, who is responsible for serving your web page? Is it CDN, Is it cache plugin?
Just go through it.
Check .htaccess file properly
How to prevent from this problem?
Please do not add random .htaccess rule in your site. More .htaccess likely to be more slower website, higher CPU usage. Beware!!
Do not use untrustworthy plugin.
Thanks & Regards,