See Live Updates to HTML/CSS Changes Immediately! Disable Cache

Cant see changes to HTML or CSS code immediately show up on your website? Here’s how to easily turn off browser caching during web-development.

Lost HTML

Some hosting companies enforce caching for the good of their users — but all that’s needed is to add this little snippet to .htaccess to control (in this case disable) web page caching across all browsers for changes to reflect immediately.

# DISABLE CACHING
 <IfModule mod_headers.c>
 Header set Cache-Control "no-cache, no-store, must-revalidate"
 Header set Pragma "no-cache"
 Header set Expires 0
 </IfModule>

Then hit on that refresh + shift button and Voila!

…htaccess? Have a look under your public_html folder and make sure that you can see invisible files. For example, cPanel’s file manager has a setting for that.

 

Comments, questions, worries? ..welcomed with open arms!

 

Twitter Button Facebook Button Google Button LinkedIn Button

Leave a Reply

Your email address will not be published. Required fields are marked *