How to Disable cache for website?

You can disable caching for your website through .htaccess file. You can add following code to your .htaccess file:

 

<FilesMatch "\.(css|flv|gif|htm|html|ico|jpe|jpeg|jpg|js|png|pdf|swf|txt)$">
	<IfModule mod_expires.c>
		ExpiresActive Off
	</IfModule>
	<IfModule mod_headers.c>
		FileETag None
		Header unset ETag
		Header unset Pragma
		Header unset Cache-Control
		Header unset Last-Modified
		Header set Pragma "no-cache"
		Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
		Header set Expires "Mon, 10 Apr 1972 00:00:00 GMT"
	</IfModule>
</FilesMatch>

 

  • cache, disable
  • 0 Kunder som kunne bruge dette svar
Hjalp dette svar dig?

Relaterede artikler

Flash tutorials to manage control panel

My SQL A guide to creating and modifying MySQL databases in cPanel. Quality: High | Low Change...

Flash tutorials to manage email

Email Accounts Manage the email accounts associated with your domain(s). Quality: High | Low...

Where can I find cPanel tutorials?

Check cPanel docs :http://www.cpanel.net/docs/cpanel/

How do I use .html files to run SSI (Server Side Includes)?

Apache Handlers This is what you would use to specify how to treat file types. By default,...

WordPress SMTP Authentication

SMTP auth support can be added in wordpress through third party plugins. You can follow these...