javascript - $(item).load() script breaking (only in IE11), works in developer tools -


i have function looks this:

function foo(item) {     var url = $(item).attr("data-url");     if (url && url.length > 0) {         $(item).load(url);     } } 

this function triggered drop downs .change() event. load() calls out mvc4 partial view, returns html. works fine , dandy in chrome , firefox, doesn't work in ie11 (i haven't tested in older versions of ie since don't support in circumstance). however, open developer tools in ie, works perfectly; don't have besides hit f12 work.

i not have "console" code in js files, server pushing valid html, , can't find other issues into.

i hate make such open ended question, can give me advice on for? things find online pull out "console" code (which didn't have in first place).

any suggestions/guidance appreciated.

the issue ie caching results of calls. ie's developer tools (from understand) automatically removes caching page when it's enabled, why page worked when tried debug in ie. solve problem placed code

$.ajaxsetup({ cache: false }); 

at begining of $(document).ready section. keeps page caching ajax results , solved issue.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -