Skip to content

Instantly share code, notes, and snippets.

@kabturek
Created April 21, 2010 07:32
Show Gist options
  • Save kabturek/373542 to your computer and use it in GitHub Desktop.
Save kabturek/373542 to your computer and use it in GitHub Desktop.
jQuery(document).ready(function($){
$(document).ajaxError(function(e, xhr, settings, exception) {
//if the status of an ajax call is 401 reload the page
//depending on you requirements you can specify window.location = http://...
if(xhr.status == 401){
window.location.reload() ;
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment