[Javascript] Use javascript to stop linked CSS getting fetched from cache?

Steve Axthelm steveax at pobox.com
Fri Jun 15 14:57:43 CDT 2007


On 2007-06-15 Barney Carroll <(unknown sender)> wrote:

>I have a site that uses relatively convoluted CSS to achieve equal
>height columns in various circumstances. The method is complicated but
>it works accross browsers - except, in various places, when rendered
>from the cache in IE7 and Firefox.
>
>After trying various things to modify the computed styles, I realised
>that all I really need to do is make sure the CSS rules are reinstated
>when each page loads, so I need to either
>
>a) find a way to make sure the linked CSS is reloaded on page load

Adding a random query string to the end of the style sheet href 
will do what you want:

<link rel="stylesheet" type="text/css" href="style.css?aaa" 
media="screen" />

I'd be inclined to revisit the convolution to see if there were 
another way to skin that cat without requiring the browser to 
reload the style sheets on every page load though.


-Steve

-- 
Steve Axthelm
steveax at pobox.com




More information about the Javascript mailing list