Automatic update of style sheets Control + F5

Is there a way to force a Control+F5 on a user? We publish our code and the style sheets look horrible until they do a control+F5, but other than putting a message on the screen, how do we trigger the style sheets to update?

Starr DuskkASP.NET VB.NET DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey Dake Senior Director of TechnologyyCommented:
There are several ways to accomplish this.  One way I have used is by using a checksum on the file and adding that as a parameter.  When the file has new css in it, the checksum changes so the browsers know to re-download the file.  

Here is a pretty good article with several other techniques you could use as well.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Julian HansenCommented:
A URL is defined by the path to the file AND any parametes that are specified so
are seen as different URL's to the browser. If the browser has cached the first and you put the second in your html file the browser will reload the file.

The paramter on the end of the URL does not interfere with normal file download so adding it is benign.

Usual strategies are to include a version number on the end of the url (as shown above) and to change this on each iteration of the css file.

You want it to be static for a specific version so you don't lose the benefits of caching - but when a change is made simply update the version number. Depending on your code environment this can be automated.
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:
Julian HansenCommented:
You are welcome.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.