auto-versioning filenames for cache busting
# January 23, 2013 at 1:26 pm
I’m a bit behind the ball on this. I have not used far-future Expires headers for cache control.
Main reason, I’m not sure on best-practices of doing this with the least amount of effort.
Anyone have any insight to share?# January 23, 2013 at 5:04 pm
Sorry about that. Had a quick look at the article, saw it was doing all sorts of fancy server-side stuff, and didn’t scroll down all the way.
I would just change the query string manually. It’s unlikely that you would be liking up the same stylesheet/js file from lots of different files.# January 23, 2013 at 7:44 pm
> So is this the way you guys are going about it? To append to the query string, are you utilizing a PHP function, or manually changing the query string value?
I usually append `?< ?php echo time(); ?>`. I’ll admit that’s lazy of me, but it works. A better approach is to set the appropriate headers.
If you’re only “basting the cache” once (e.g., you updated whatever, and you don’t plan on doing so again anytime soon) you might add the query string manually.
You must be logged in to reply to this topic.