Updating Website



How can I ensure that my visitors are viewing the most up date version of my site?


I assume you are referring to issues involved with page caching. There are a couple of meta elements you can add to the of your documents that can indicate caching is undesirable, but these aren’t necessarily supported by all browsers:


[/code]The latter meta element is really for older browsers. A more robust method is to use HTTP headers to deal with this. For maximum redundancy, set the headers like this: [code]Cache-Control: no-cache Pragma: no-cache[/code]If you are using PHP, you can [url=http://us.php.net/header][b]set headers[/b][/url] by placing statements at the top of your document like these: [code]<?php header("Cache-Control: no-cache"); header("Pragma: no-cache"); ?>[/code]-- [url=http://jessey.net][b]si-blog[/b][/url] -- [b]Max[/b] discount on [i]any[/i] plan with promocode [url=http://dreamhost.com/r.cgi?53419/signup|SCJESSEYTOTAL][b]SCJESSEYTOTAL[/b][/url]


Thanks so much for your response!

the HTTP header method sounds more like what I’m looking for…

Would it be possible to explain how to go about this in more detail?



Assuming your Apache installation is running the mod_headers Apache module (and I think most are), you can set the headers in your .htaccess file like this:

Header set Cache-Control "max-age=0, no-store"Ignore the “pragma” thing I mentioned earlier - it shouldn’t be needed on the DreamHost setup and it would essentially create an invalid server response. If you want to restrict this behavior to a specific file or group of files, you could do something like this:

<Files index.html> Header set Cache-Control "max-age=0, no-store" </Files>Or this:

<Directory "/home/username/domain/path/to/folder-you-don't-want-cached"> Header set Cache-Control "max-age=0, no-store" </Directory>si-blog
Max discount on any plan with promocode SCJESSEYTOTAL


Sweet! I’ll let you know how it goes. Thanks again.


Used the first htaccess setting and everything seems to be working as planned!



I did not know this. Apache is so sweet!

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here