Is there a way to map a URL to a local file so that when IE sends a request for that URL it gets the content from a local file?

For example: http://www.example.com/file.zip ---> C:\file.zip

I'm trying to achieve a permanent "cache" for some specific files so that IE always retrieve those files from the harddrive. And then I need a way to change the content of those files if needed.

Something like a permanent entry in the IE cache that never expires and is never deleted.

Could this be done with a proxy autoconfiguration file? (those with .pac extension)

  • This presumably only needs to work on your machine?
    – MrWhite
    Feb 27 '13 at 23:16
  • Yes, only in my PC and for IE only (although a solution for all browsers is fine as well)
    – GetFree
    Feb 27 '13 at 23:23
  • Can you not use the file:// protocol directly? Or does it have to be a request for an external file that is routed internally?
    – MrWhite
    Feb 28 '13 at 0:00
  • 1
    Also, do you have control over this external site? Or is it just some arbitrary website?
    – MrWhite
    Feb 28 '13 at 0:17
  • Yes, it's for a third party website, I can't change the URLs.
    – GetFree
    Feb 28 '13 at 0:39

I found a couple of tools that do exactly this.


Im not sure why you'd need this. It would worry me for security issues (does he really need to redirect www.mybank.com like that?) But lets assume you have a good reason.

You ask for a hard task; how is the cache to be updated, if it never hits origin servers? What is the criterion for a cache reload? "Never change, unless I want it to change for some reason"

I think the closest you can get is a caching proxy. Id check the docs on squid to see if you can lock certain content in. This won't work (by design) for https sites though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.