I’m doing some content replacement via jquery load() on a number of places on page.
<script>
$(document).ready(function(){
$('#row').load('/getStudentDetails',{studentId:3});
});
</script>
On my dev server things work perfectly. On my live server sometimes it gives me a “request is invalid” error which I can see in firebug. I think the server is getting overwhelmed, or perhaps some caching module is getting confused with several requests. I’ll try to figure out that issue separately, but also simply want it to retry the same request (once) if it fails. Is there a slick jQuery way to do that?
I wouldn’t call it slick, but you could use the callback function of
$.load. If the status iserror, you can redo the load.