From d076f293df86491345b04a421a19a7aac2c03505 Mon Sep 17 00:00:00 2001 From: Bradley B Smith Date: Sat, 19 Nov 2016 08:53:15 -0500 Subject: [PATCH] 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. --- lib/request.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/request.js b/lib/request.js index 892e28d..6e5e33d 100644 --- a/lib/request.js +++ b/lib/request.js @@ -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 } -- 2.49.1