CSS not working until browser restart

Hi all,

I’m using a stylesheet to style my page.
This page loads over 300 records from my database, and put’s each record in a table cell (td).
Now my problem is, when i make changes in the stylesheet, the webpage doesn’t immediatly (after a refresh) read the stylesheet…
I first have to restart the entire browser before it works.
Or i have to wait half an hour or so before it works.

anyone got a clue about how this is possible?

Regards,

Have you tried a second refresh? I sometimes find after the first refresh, the browser just assumes it can use the cached sheet, but then on the second refresh it updates.

I’ve tried refreshing like 10 times or something… won’t work
Thanks for your reply :wink:

EDIT:
Firefox does work this time, but IE doesn’t :s

The stylesheet is held in cache and you would usually need to hard refresh the page to see the changes. Or you could just rename the CSS file by adding an identifying version number or something similar to the end of the name when you make a change to it.

Or automate the process.

Thanks paul, your suggestion works
i’m now using the method of this site
http://css-tricks.com/can-we-prevent-css-caching/

But isn’t this a ‘nasty’ solution?

You only really need to do this during testing and development because once in production you want your css to be cached otherwise the visitor has to reload it new each time.

Force refresh (ctrl+F5) ?