views:

289

answers:

5

It looks like IE7 doesn't reload the latest version of my stylesheet each time I upload a new version on the server. This is annoying as I am debugging my .css file to make it work on IE... Tried to empty the browser cache but still not working.

Thanks for your help.

+3  A: 

Ctrl-F5 - forcible way to reload in IE

Dewfy
why do i have to sometimes do it several times for it to work?
darasd
@darasd if we are still talking about IE - install Fiddler and look what really happens when transferring content from server to client. Don't forget about server side caching (for example developers instead of counting every time number of users in the system, cache this value for example at 1 min)
Dewfy
A: 

2 Questions:

  1. Does IE eventually load with the newer stylesheet?

  2. How are you saving the changes to the server (SSH, Web Interface, etc.)?

I ask because I ran into an issue with a web-based file management system a while back where one browser would show the CSS just fine, the other wouldn't, and we noticed the issue of which browser played nicely depended on which browser we used to upload the CSS.

The reason turned out to be that IE gave the CSS file a different MIME type than Firefox. If you continue to notice the issue even when you've cleared the cache, check the MIME type of the file using Firefox by going to Tools > Page Info.

Also, if it is simply a caching issue, consider turning caching off in IE. I believe this should be an Advanced Option under Internet Options.

Also, you may want to try creating a special developer environment for IE (if it comes down to it.) Perhaps have another machine with IE7 and no caching and any other features turned off (A kiosk mode, perhaps), and then previewing the page on that machine.

Anthony
1. No2. Not sure if it helps but I use Coda with a FTP TLS/SSL protocolI think I will do a proper Windows special development environment soon :)Txs a lot
+1  A: 

Include your version number in the file name. myfile_v1234.css

Luis Melgratti
A: 

Thanks to you all!

I did manage to solve my problem with the "stupid" Ctrl+F5, and by changing the Internet Parameters of Windows to reload content every new visit.

A: 

When testing, every time you do an update you can just wite "stylesheet.css?r=98123"

As long as the query string is different, it'll be downloaded again.

If you need, you can use javascript to append Math.random(), to get the random number. Not required on production though, when updates would be stable.

Noon Silk