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 authored and GitHub committed 2016-11-19 08:53:15 -05:00
1 parent acdd87ef3d
commit d076f293df
1 file changed
+1
+1
View File
@@ -19,6 +19,7 @@ module.exports = function(location, callback) {
request.open("GET", location, true) request.open("GET", location, true)
request.setRequestHeader("X-Requested-With", "XMLHttpRequest") request.setRequestHeader("X-Requested-With", "XMLHttpRequest")
request.setRequestHeader("X-PJAX", "true")
request.send(null) request.send(null)
return request return request
} }