I'm not referring to preloading images, I want to preload an HTML page using JQuery.
Thursday, November 18, 2010
test
9:11 PMAjax the content in then use as you wish:
If you are just trying to leverage caching as much as possible a hidden iFrame may work better. You can then use jQuery to cycle the iframe src to fetch multiple pages.
var myPrefetchedPage;
$.ajax({
url: "test.html",
cache: false,
success: function(html){
myPrefetchedPage = html;
}
})
myPrefetchedPage is now the full content - which can be injected into the current page (completely replacing the page if required.If you are just trying to leverage caching as much as possible a hidden iFrame may work better. You can then use jQuery to cycle the iframe src to fetch multiple pages.
Subscribe to:
Comments (Atom)
0 comments: