Permalink
Browse files

set an X-PJAX header instead of appending a param

  • Loading branch information...
1 parent 229065f commit 4367ec98ecf349024956eb0ebdee8789612af0f9 @defunkt defunkt committed Mar 24, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 jquery.pjax.js
View
@@ -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

0 comments on commit 4367ec9

Please sign in to comment.