Send the PJAX header with request

Make it more compatible with the jQuery PJAX and lets the server choose to optimize the response. Sending the list of selectors would be nice, too.
This commit is contained in:
Bradley B Smith
2016-11-19 08:53:15 -05:00
committed by GitHub
parent acdd87ef3d
commit d076f293df

View File

@@ -19,6 +19,7 @@ module.exports = function(location, callback) {
request.open("GET", location, true)
request.setRequestHeader("X-Requested-With", "XMLHttpRequest")
request.setRequestHeader("X-PJAX", "true")
request.send(null)
return request
}