How can I disable caching?
-
Hi All,
I have a problem: each time my blog updates (i.e. a new entry added), I don’t see the changes until I press ctrl+F5 to refresh the page. The same with comments: if someone adds a comment, and I open that page, I only see the old comments, and I have to press ctrl+F5 to see the new one.Can I disable caching somehow for my blog?
I just checked the headers in mozilla dev.toolbar:
Date: Mon, 07 Nov 2005 22:21:54 GMT
Server: Apache/1.3.33 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2634a mod_ssl/2.8.22 OpenSSL/0.9.7d
X-Powered-By: PHP/5.0.4
Connection: close
Content-Type: text/html; charset=UTF-8
I guess these headers missing:
header('Expires: Mon, 11 Jan 1984 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate, max-age=0');
header('Pragma: no-cache');
How can I add them?
P.S. I’m on WordPress 1.5
- The topic ‘How can I disable caching?’ is closed to new replies.