Prevent Your CSS and Javascript Files From Being Cached

Some websites use highly volatile, oft-changing CSS and javascript files. In the case of these files, it’s important that the developer prevent browsers from caching them. How do we do that? By using a phantom querystring, of course. We’ll use PHP to tack the current time onto the file reference. It’s a very simple technique and doesn’t affect your CSS or javascript code in any way…

chevron_left
chevron_right

Leave a comment

Your email address will not be published. Required fields are marked *

Comment
Name
Email
Website