Unable to play now, but try to return home ...
I tested with:
app.js
router.get(/resource./, function(req, res) { res.setHeader('Cache-Control', 'public, max-age=90'); res.send('<hr/>'); }); router.get('/', function(req, res) { res.render('index'); });
index.html
<!DOCTYPE HTML> <html> <body> <script type="text/javascript"> var get = function (url) { var xhttp = new XMLHttpRequest(); xhttp.open("GET", url, true); xhttp.send(); } get("resource1.html"); // Cache-control set setTimeout(function () { get("resource2.html"); // Cache-control not set }, 10); get("resource3.html"); // Cache-control set </script> </body> </html>
They all get 200 ...

And cache management
HTTP/1.1 200 OK X-Powered-By: Express Cache-Control: public, max-age=90 Content-Type: text/html; charset=utf-8 Content-Length: 5 ETag: W/"5-mkFFtL4+3G6hWYdNAMJUPw" Date: Thu, 03 Mar 2016 16:09:48 GMT Connection: keep-alive
In addition, the magazine:
1st time
Listening on port 3000 GET / 200 12.544 ms - 499 /resource1.html undefined GET /resource1.html 200 1.389 ms - 5 /resource3.html undefined GET /resource3.html 200 0.353 ms - 5 /resource2.html undefined GET /resource2.html 200 0.233 ms - 5
2nd time
GET / 200 1.627 ms - 499 /resource1.html no-cache GET /resource1.html 200 0.427 ms - 5 /resource3.html no-cache GET /resource3.html 200 0.160 ms - 5 /resource2.html no-cache GET /resource2.html 200 0.408 ms - 5
malix source share