Created
August 11, 2011 07:54
-
-
Save adammw/1139129 to your computer and use it in GitHub Desktop.
IE9 302 Redirect Caching Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| var http = require('http'); | |
| var state = 1; | |
| http.createServer(function(req, res) { | |
| if (req.url == '/redirme') res.writeHead(302, {'Location':'/redir' + state}); | |
| if (req.url == '/cacheme') res.writeHead(302, {'Location':'/redir' + state, 'Cache-Control': 'max-age=120'}); | |
| if (req.url == '/changestate') state++; | |
| res.end('redir state: ' + state); | |
| }).listen(8080); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment