Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file caching in IIS

Status
Not open for further replies.

NuJoizey

MIS
Aug 16, 2006
450
US
I'm not sure if this is an IIS question, or a browser question, an adobe acrobat question, or maybe even a javascript question, but I thought I'd try here first.

I have a page the opens a pdf file like so from an
Code:
href="#" onClick="window.open('somePath/testFile.pdf'); return false;"

the contents of the pdf file changed, so i uploaded a new testFile.pdf. Problem is, every time I clicked on the link, I'd get the old pdf file. This is true under firefox and ie. So I tried refreshing the screen. Nothing. I then tried clearing my browser caches. Nothing. I deleted the histories in each broswer and even deleted the files themselves on the server trying to get a 404 not found error - no matter what I did I could not get the new testFile.pdf to show up.

The only way I could fix it was to change the name to testFile1.pdf and change where the link went.

I can only guess this behaviour is due to the way files are cached in the browser, but maybe it's something to do with a setting on IIS? Can someone explain this as this is the first time I've run into this problem. thanks!
 
The problem that you are having is that IIS isn't seeing that the file has been updated. When you save a file a hash marker is overwritten that is suppose to tell IIS that the file has been changed. Either this isn't being written, or IIS isn't seeing it.

One thing you can do is from a command prompt on the IIS server do an iisreset. This will restart IIS and clear is file cache. However all users will get a site not found until it restarts (between 5 and 10 seconds).

A previous comapny I worked at had this problem, and it turned out to be a problem with the NAS that we were using to host the sites on. What kind of storage are you using? What version of IIS?

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top