Best ways to ensure fresh content.

liunx

Guest
Is there any sure fire way to ensure that pages are serving up fresh content?

Here's my scenario. I've built a site that doesn't have any random query strings on it's navigatinal links. This site is already in someones cache. this someone returns to the site, after I have appended random query strings to any of the href links. I'm guessing that since the entire page is already in the cache the updates will not be viewable anywhere. hrmm....

Can I expect that the browsers will automatically check for this small change? Depending on the user's browser settings?

It's amazing that I don't know how this works completely! Updates are common-place.

I'm also curious about these meta tags. Seen rumors around that this will tell SE's to not cache the content either, that's no good!
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">Don't worry, browsers and servers have a system. There is a whole lot of behind the scene, handshaking that you don't see. With each file the server sends a set of HTTP headers, and the browser can request just these. And these headers will typically include the file size, the date of the last update and an e-tag. The e-tag will change each time you save the file anew. If the browser already has the page in its cache it will ask for just the headers so it can tell if it needs to grab a whole new copy.Charles, Thank you. That is great. Been checking headers here and there. Luckily the server I'm worried about is set up as Cache-Control: max-age=0

I'm guessing that I can throw this in .htaccess files if I don't have root.

<FilesMatch "\.(php|cgi|pl|htm)$">
ExpiresDefault A0
Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</FilesMatch>

Now the only thing i'm worried about is dealing with Incompetent server admins. Was on the phone with this guy running an IIS box, I was trying to get him to help me setup .asp files as defaults, and I told him that I didn't know much about IIS servers. his response: "I don't either" !!!!
 
Back
Top