|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
IIS is handing out old versions of my javascript
I've set expire immediately for my entire web site.
However IIS seems to still hand out old versions of my scripts. In internet explorer and firefox I've tried clearing the cache and then reloading the page and even doing that it seems to need at least a minute or so before the new version of the script will be sent. This is making development a huge pain in the rear end. Any suggestions?
__________________
Like the answers I give? Why not ask me directly at my forum. I'm always glad to help. Javascript scripts and tips can be found at Dynamic Tools. Check out DynamicTable, the best javascript table sorter around. Get reliable and affordable hosting at www.thinksmarthosting.com |
|
#2
|
|||
|
|||
|
Do you have some caching proxy server at the webserver site? IIS hands out whatever it's asked to hand out, browser caching has nothing to do with IIS. There may be some proxy settings in IIS to check, but I've not run across this issue.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Would the indexing service or wins do any proxy stuff?
IIS does have something to do with caching in that you can tell it set the expiration date. If it passes out immediately expired documents browsers shouldn't cache them. Naturally it can't actually enforce that. I don't think there's a proxy between me and the server, but I'm not entirely sure how to tell. I know that old file being served up isn't cached locally and has been overwritten in the iis web directory. Where the out of date file is coming from is an annoying mystery. |
|
#4
|
|||
|
|||
|
Are you sure that this is IIS problem?
Does this happen with ASP pages? If yes, can you print time somewhere on the problematic page and see if it changes with each new request? Could it be that you have uploaded js page to the wrong location? |
|
#5
|
|||
|
|||
|
ASP pages update immediately, I have no problem with them being cached.
It's any non asp pages that end up cached. I just did a test with straight html pages and they don't update either. I can't tell you certain that this is an IIS problem. All I know is that it's driving me nuts! |
|
#6
|
|||
|
|||
|
I have this file on the server
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>New Document</title>
<script type="text/javascript">
function init()
{
}
window.onload = init;
</script>
<style type="text/css">
html, body
{
margin: 0px;
}
</style>
</head>
<body>
test
</body>
</html>
It loads fine. I change the text to test 2.
The fact that restarting iis results in getting the updated page makes me think that IIS is at fault Last edited by ProggerPete : April 3rd, 2006 at 07:30 PM. |
|
#7
|
|||
|
|||
|
What version of IIS?
|
|
#8
|
|||
|
|||
|
How can I find out what version of iis is running?
|
|
#9
|
|||
|
|||
|
Windows NT4.0 = IIS 1.0, or 2.0, or 3.0, or likeliest 4.0
Windows 2000 = IIS 5.0 Windows XP Pro = IIS 5.1 Windows 2003 = IIS 6.0 In the past I've seen some strange apparent page caching on IIS4 but never on newer IIS versions. |
|
#10
|
|||
|
|||
|
The server is running Windows 2000
|
|
#11
|
|||
|
|||
|
I don't have any more ideas, I've never seen a problem like you describe with IIS5.
There are some good IIS specific sites like www.iisfaqs.com maybe you can find something there. I'd be looking for something else other than IIS caching pages but I could easily be wrong. |
|
#12
|
|||
|
|||
|
I am going INSANE!!!!
In order to develop in IIS I am still having to restart IIS after every tiny little javascript change. If Gates walked by me right now he'd be in trouble. Here's the test file I'm using. Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> </head> <body> Test 1 </body> </html> It loads the 1st time no worries. I then edit it and change it to read Test 2. Doesn't matter how many times I refresh I keep getting back Test 1. Restarting IIS fixes it so I'm convinced IIS is to blame. If IIS isn't running I get an error saying the page can't be found so there is no caching anywhere in my system. Someone please help me before the men in white coats come to take me away!! |
|
#13
|
|||
|
|||
|
Quote:
I still suspect there is some caching going on somewhere, it's the only thing I can think of that would explain what you're seeing. I'm sure you probably did this already, but have you checked the cache settings in your browser? You could try turning off browser caching as a test. |
|
#14
|
|||
|
|||
|
Yah, my browser is set to check for new version on every visit to the page.
|