What a way to start the weekend, jQuery 1.4 has been released! There’s so much ubber goodness in this release I nearly fell of my chair! I have yet to muse about but most definately worth a look, the performance boosts are insane!
{lang: 'en-GB'}
Categories: Cool Tools, Developer, Tools / Products, Web / Internets Tags: chrome, firefox, google, ie, javascript, jquery, js, microsoft, safari, visual studio, web developer, webdev
Had a nasty issue with jQuery + jSON + IEx just now – still at work because of it!
This bit of code works perfectly fine on Firefox and Chrome:
function onUnitsModified() {
$.getJSON("<%=Url.Action("GetTotalUnitCount", "ProjectReaper")%>", null, function(result) {
if(result > 0)
// Do stuffs here
}
});
return true;
}
But in IE we’ve come to realise that the first hit is successful, future json requests ones are not hitting the ASP.NET MVC actions (I put a breakpoint). You could append a time stamp to get rid of this annoying caching bug, but alternatively you can use the ajaxSetup options to disable caching.
function onUnitsModified() {
$.ajaxSetup ({ cache: false});
$.getJSON("<%=Url.Action("GetTotalUnitCount", "ProjectReaper")%>", null, function(result) {
if(result > 0)
// Do stuffs here
}
});
return true;
}
Darnit! Hope someone else doesn’t waste their time trying to fix this now
{lang: 'en-GB'}