Pjax work twice

Pjax work twice(Determined by the session). Found a solution, but not work


$( window ).load(function() {

	$.pjax({

		url: xhr.getResponseHeader('Location'),

		container: '#p0',

		async:false,

		timeout: 4000000000000000000 // pick a suitable timeout

	});

});