Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

set an X-PJAX header instead of appending a param

  • Loading branch information...
commit 4367ec98ecf349024956eb0ebdee8789612af0f9 1 parent 229065f
@defunkt defunkt authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 jquery.pjax.js
View
4 jquery.pjax.js
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.