Skip to content

Commit

Permalink
set an X-PJAX header instead of appending a param
Browse files Browse the repository at this point in the history
  • Loading branch information
defunkt committed Mar 24, 2011
1 parent 229065f commit 4367ec9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jquery.pjax.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ jQuery.pjax = function( options ) {
var defaults = {
push: true,
replace: false,
data: { pjax: true },
type: 'GET',
dataType: 'html',
beforeSend: function(xhr){
xhr.setRequestHeader('X-PJAX', 'true')
},
error: function(){ window.location = options.url },
success: function( data ) {
// If we got no data or an entire web page, go directly
Expand Down

0 comments on commit 4367ec9

Please sign in to comment.