• Sign In
 
  • MSDN Blogs
  • Microsoft Blog Images
  • More ...
Common Tasks
  • Blog Home
  • Email Blog Author
  • RSS for comments
  • RSS for posts
Search
  • Advanced search options...
Tags
  • .NET Framewor
  • .NET Framework
  • Ajax/Javascript
  • ASP.NET
  • CLR
  • Cool stuff
  • DataAccess
  • Debugging/Windbg
  • Hotfix/Service Pack
  • IDEVDataCollector
  • IIS
  • Internet Explorer
  • Italian techs
  • LogParser
  • OT
  • Personal
  • Productivity
  • Random
  • Scripting/ASP
  • Security
  • Technology
  • Tools
  • Troubleshooting
  • Vista/Longhorn
  • Visual Studio
Archives
Archives
  • November 2010 (1)
  • October 2010 (1)
  • July 2010 (2)
  • April 2010 (1)
  • March 2010 (2)
  • February 2010 (2)
  • January 2010 (1)
  • October 2009 (2)
  • September 2009 (2)
  • August 2009 (1)
  • July 2009 (5)
  • June 2009 (1)
  • May 2009 (1)
  • April 2009 (3)
  • March 2009 (3)
  • February 2009 (5)
  • January 2009 (3)
  • December 2008 (5)
  • November 2008 (3)
  • October 2008 (2)
  • September 2008 (3)
  • August 2008 (3)
  • July 2008 (3)
  • June 2008 (5)
  • May 2008 (4)
  • April 2008 (8)
  • March 2008 (4)
  • February 2008 (5)
  • January 2008 (2)
  • December 2007 (4)
  • November 2007 (6)
  • October 2007 (6)
  • September 2007 (8)
  • August 2007 (6)
  • July 2007 (7)
  • June 2007 (10)
  • May 2007 (9)
  • April 2007 (12)
  • March 2007 (8)
  • February 2007 (5)
  • January 2007 (3)
  • December 2006 (1)
  • November 2006 (4)
  • October 2006 (2)
  • September 2006 (9)
  • August 2006 (2)
  • July 2006 (1)

Don't let IE local cache drive you crazy!

MSDN Blogs > Never doubt thy debugger > Don't let IE local cache drive you crazy!

Don't let IE local cache drive you crazy!

Carlo Cardella
16 Dec 2007 8:04 AM
  • Comments 4

I stumbled across this issue multiple times during my life of web developer (which begun about 10 years ago), it appeared every now and then to complicate things when I was in the middle of a heavy debugging sessions and doing frequent changes to my pages; I was expecting some kind of results but despite the fact that the code was looking good, there were no signs of those changes. Sometimes even adding a new UI element like a button or an image or changing the color of a header had no effect... smile_sarcastic Having a look at the page source within IE demonstrated the browser was somehow right not showing the new image or color because it was not there in the code... where was that source coming from? smile_omg

Well, if it does not come from the web server, then it's loaded from the IE local cache... so let's go to Internet Options > General > Delete > Temporary Internet Files, give it another try and guess what? This time it works...! So, not sure why, but for some reason IE was not refreshing its case and was using an outdated version of my pages. Then after a while I forgot about problem.

Last week I got a call from a customer about an applications they are developing, but he was getting a Javascript error on the client-side: "WebForm_PostBackOptions is undefined". Looking at the page source within IE confirmed that the WebForm_PostBackOptions method was really missing, but we had to discover the reason. As you may know, in ASP.NET 2.0 resource files (such as images, CSS stylesheets, javascript etc...) are served through the WebResource.axd handler, which is for example responsible to serve the client-side javascript code used to post back the page, for validation used by the Validation controls etc... There is a known issue with WebResource.axd where using Http Compression prevents the client-side scripts to render correctly and it's necessary to exclude the handler from the compression to have it working normally; so we checked if IIS was using Http compression, but it wasn't.

Next step has been to use Fiddler to trace the http traffic between the web server and the client and everything looked fine, all resources and files (included WebResource.axd) were downloaded correctly... smile_thinking Then my past experiences with IE temp cache came back to my mind, and asked the customer to clear the IE cache before trying again: well, as you can guess, that solved the problem! For sore reason IE was downloading the .axd file but kept using the cached (corrupted) one, which did not contain the WebForm_PostBackOptions implementation.

I have to say that every time I encountered this problem, I (or the customer) were developing and debugging on localhost so the machine was somehow playing a double role, not sure it this can be the (very high level) explanation of this weird behavior... anyway remember to clean your local caches and temporary folders if your application starts behaving odd...

 

Carlo

Quote of the day:
A strong conviction that something must be done is the parent of many bad measures. - Daniel Webster
  • 4 Comments
ASP.NET, Debugging/Windbg, Visual Studio, Ajax/Javascript, Internet Explorer, Scripting/ASP
Leave a Comment
  • Please add 3 and 2 and type the answer here:
  • Post
Comments
  • MSDN Blog Postings » Don't let IE local cache drive you crazy!
    16 Dec 2007 8:18 AM

    PingBack from http://msdnrss.thecoderblogs.com/2007/12/16/dont-let-ie-local-cache-drive-you-crazy/

  • Wes MacDonald
    16 Dec 2007 9:30 AM

    The Internet Explorer Developer Toolbar has saved me from this issue many times.

  • Raj Kaimal
    16 Dec 2007 10:09 AM

    Another option to check is the setting in IE for

    "Check for newer versions of stored pages". Some users have this setting, somehow, set to "Never".

    In addition, I remember having to set this to "Every time I visit the page" when debugging pages in IE5/6. I have not run into this issue with IE7 though.

    Raj Kaimal

  • anonymous
    17 Dec 2007 2:58 AM

    Two things I don't like about IE are:

    1. Since IE7, it actually limits the cache to 1024 MB.

    2. There should be a "Delete all but cookies" option. There's Delete all currently or you can delete one by one manually. Firefox does this intelligently but providing checkboxes for items to be cleared.

Page 1 of 1 (4 items)
  • © 2012 Microsoft Corporation.
  • Terms of Use
  • Trademarks
  • Privacy Statement
  • Report Abuse
  • 5.6.402.223