ajax - jQuery: Why isn't IE8 sending a request during this call to .load()? -
i trying make use of hash symbol enable back-button , refresh functionality in ajax web app.
in firefox , chrome when click refresh browser reloads , when script below run new request made using url appears after # sign.
in ie8 request never made during refresh, alert pops if has! can reproduce behavior in simplified html document posted here:
full html doc http://pastebin.com/cvyswtup
sample code
$(document).ready(function () { // 1. ajax history & button $(window).bind("hashchange", function (e) { if (!ignorehashchange) { // load content $("#content").load(location.hash.substring(1), function () { alert("content loaded!"); }); } ignorehashchange = false; }); // 2. home page / refresh action if (location.hash) { $(window).trigger("hashchange"); } else { location.hash = "customers/list"; } });
edit: same behavior in ie8 when using $.get()
ie reading content local cache. see jquery's .load() not working in ie - fine in firefox, chrome , safari details , workarounds.
Comments
Post a Comment