1
css caching
CGuild1.com > Tips & Tricks > css caching

Stop CSS Caching in Browser



If you work like I do, then you work on a "live" server and look at every change you make in a browser. Many browser default to cache pages and files your machine loads over the ineternet.

Here's a quick snippet that will allow you to stop the cahing of your css files. Simply put this at the end of your CSS call in your header.

?<?php echo date('l jS \of F Y h:i:s A'); ?>

Example Useage:
<link href=\"../my-styles/settings.css?<?php echo date('l jS \of F Y h:i:s A'); ?>\" rel=\"stylesheet\" type=\"text/css\">

Don't forget to remove this before you set your site to production.
©2024 CGuild1.com