I'm not a js or caching expert or anything, so maybe I just don't understand how it's supposed to work. But I don't see how that is supposed to detect whether or not a file is cached by the browser. If it's cached it just means that loading it won't require a request to the server, but it doesn't mean that it will already be loaded for you. So it seems to me that testVar would always be undefined.
|