Add time stamp to stylesheet to stop server caching
Do you have a problem with server caching on your web server?
This can be very annoying when developing a new website.
I first noticed this when developing a new client website on one.com servers who are famous for caching.
What this means:
Server caching by web hosts is great for running live websites as it cuts down loading time and increases browsing site-speed. However, when it comes to making changes to the site (development), these change take between 2 to 60 minutes.
To stop your website from being affected by the server cache, you can add a time stamp to your stylesheet. Here is the code for the default theme stylesheet when developing WordPress websites:
<link rel=stylesheet href=”< ?php
. ‘?t=’ . filemtime( get_stylesheet_directory() . ‘/style.css’ );