Caching is really up to the browser, and sometimes the ISP. And you might argue that anyone who goes a year without emptying their browser cache deserves everything that happens to them. But telling anyone, anywhere, that a file isn't likely to change in the next year is probably not something you'll do again in a hurry ;)
Maybe on the internet equivalent of a tombstone-- but even then, what if you got the year wrong and had to call the stonecutter? It sounds as if you have two separate things. One is the physical javascript file, which will go away if and when the cache is emptied. The other is the redirect response; it's up to the browser how long it chooses to remember this. I assume it's a redirect to some malign third-party site, so you can't do anything from the target end.
Is there any way to figure out which place the redirect is coming from? That is, from the javascript file that the user's browser hasn't deleted, vs. from the browser's own memory of the redirect? Under what circumstances will this actually affect human users?
But if you type the original url for the old file, it appears on your browser.
Do you mean the URL of the page, or the URL of the old javascript?
For comparison purposes: My logs periodically show a request for an administrative gif that I stopped using pretty exactly a year ago. One IP continued requesting it until January (that is, three months after it was last visible in page code). A second IP hung on for about a month longer. A final IP is
still asking for the file several times a month.
:: detour to check most recent records ::
Frequency has dropped off in the last two months, and it's now only asking for three different files-- it used to be four-- but, still, we're talking about a
year after the most recent time the file was requested by any page, anywhere. Wasn't there an Agatha Christie novel on this theme?