I have a site running on a localhost that uses different KendoUI grids loaded from a kendoPanelBar. It was all working fine until I updated to OSX 10.9 (Mavericks). Now I can load a grid once using a $.post jquery call, but then the second time I try and load the grid I receive a 412 (Precondition Failed). I have to empty the cache before it will let me load the grid again. The strangest part is that this is only happening in Safari 7.0. Firefox 24.0 is working as normal and can load the grids with no errors.
Is this a problem with my web server configuration that may have changed due to the upload or... could this be just localized to a problem with the new Safari or... is there something that I could be missing in my code that Safari is now strictly checking?
After doing some research I found some information related to cross domain loading that suggested this fix, although since I'm not doing cross domain calls I'm not sure why this actually worked. If someone could explain that would be fantastic.
This is the fix by changing the $.post call to using $.ajax with a GET type and async as false.
Here is the original code:
$.post( "myContent.html" )
.done(function( data ) {
$("#main_content").html(data);
});
Here is the updated code:
$.ajax({
type: "GET",
url: "myContent.html",
success: function(data) {
$("#main_content").html(data);
},
async: false
});