2

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.

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

5
  • This presumably only needs to work on your machine?
    – MrWhite
    Commented Feb 27, 2013 at 23:16
  • Yes, only in my PC and for IE only (although a solution for all browsers is fine as well)
    – GetFree
    Commented Feb 27, 2013 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
    Commented Feb 28, 2013 at 0:00
  • 1
    Also, do you have control over this external site? Or is it just some arbitrary website?
    – MrWhite
    Commented Feb 28, 2013 at 0:17
  • Yes, it's for a third party website, I can't change the URLs.
    – GetFree
    Commented Feb 28, 2013 at 0:39

2 Answers 2

3

I found a couple of tools that do exactly this.

0

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.

1
  • Oh, for debugging certain things. Commented Apr 29, 2022 at 16:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .