Thursday, May 15, 2003
Crafting Stylesheets
Maybe, like me you are forever tweaking your stylesheets (css) to get your pages to look right in all flavours of web browsers.
The problem is that when you make a change and then upload your new stylesheet to your server, it can take ages for the various caches to clear before you see your changes.
What can you do?
I think I have found the solution!
furthermore...
Caching can be a real bind when it comes to making updates to your site, because web pages (and their stylesheets) are saved on the client computer by the browser and also in server caches somewhere between the client computer and your web server. This is done for a very good reason, because it speeds things up. Why keep going back to the server to fetch the same thing each time you click the 'go back' button. To make sure that you get a 'fresh' version of your newly uplaoded web page, put a question mark after the full url in the browser window. Like this:
The problem is that you can't be sure that the stylesheet will be the 'fresh' one, even if you apply the above technique in the browser.
Here is what I do:
Where you want to link the external stylsheet, simply add the question mark at the end of the filename, like this:link href="css/somestyle.css?" rel="stylesheet"This seems to work for me.


Extra words from :
That’s very interesting Chris and not something I’ve thought of doing before. Netscape in particular thought seems to give up on external style sheets if they’re too long - almost like it can’t be bothered downloading the whole thing!
Posted on 05/15 at 01:21 PM