Is web.config cached in your browser?

Posted on 2012-09-21
Last Modified: 2012-09-21
I know that sounds like a wierd question - but let me explain:

I posted an update to our website's web.config file to redirect any request for the homepage, to instead go to our blog, and the redirect worked fine:

      <location path="index.html">
                  <httpRedirect enabled="true" destination="blog" httpResponseStatus="Permanent" />

But when I removed that line from the web.config and reposted the web.config to the website, it still redirected me to the blog whenever I tried to visit the index.html page.


I sent a support ticket to our web host asking them what could possibly be going on, but they wrote back and told me that they were NOT being redirected. They instead suggested that I clear my browser's cache and try again. I cleared the cache and it worked! No more redirect.

So my question is - why did clearing my browser's cache get rid of the redirect? Is IE caching the web.config file? I know that sounds crazy, but at the moment I can't think of any other reason?
Question by:rascal
    LVL 82

    Accepted Solution

    No, it is not caching 'web.config' but it will cache the last response to the request for that page.  You may have been able to access the page by pressing Ctl-F5 which is supposed to tell the browser to ignore the cache and fetch a new copy from the server.
    LVL 74

    Expert Comment

    by:käµfm³d 👽
    Unless you did something you shouldn't have, web.config should never be served by the server. Can you imagine what a treasure trove of mischief it would be for a malicious user to get passwords to your database from an exposed web.config!?!?!
    LVL 1

    Author Closing Comment

    Thanks Dave!

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now