Tuesday, 15 August 2017

jquery - ajax cache not working








When I click on a page and it loads i want to cache that but right now its not working, if someone can tell me where is the problem in my code and what am i missing. Here is my code:



$('.nav ul li a').click( function() {
var pageHref=$(this).attr('href');


$.ajax({

url: pageHref,
dataType: "html",
type: "GET",
cache: true,
success: function() {

$('.content').load(pageHref + " #cnt");
}

});

return false;

});

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...