Monday 15 August 2011

javascript - how to prefetch / cache iframe content? -


I have an iframe and the content takes some time to come back. I can not use iframe, so I am thinking that if I can do some way:

  1. Cache the content, so that when I come back to the page, it is very fast Will load from.
  2. Prefetch the page on which it has IFrame. Here I go to & lt; Link rel = "prefetch" href = "... ..." /> , but it seems that there is no effect on iframe

    Any ideas how to solve this issue? Can a Front End or Back and Solution be?

    Loading the iframe content creates the browser cache in it, if you load it later , The browser will easily fetch it from the cache, as long as your server is always set to not load new content. I suspect that if you are seeing it every time you reload the page of the iframe again, then you have either forgotten to indicate that the page should be cached for how long, or your server Not set to say "This page has not been modified since ..." The browser does not attempt to reload the page, or the page is served with a header indicating that it does not cache Or can be.

    (If you want to preload the material for the first time, it is that same thing as if it is loading in the iframe, iframe is hidden, and Showing when the IFrame content is created.)

No comments:

Post a Comment