sockjs/sockjs-node — pull request #88 by glasser (2012-09-25 19:39:56+00:00)
Title: Add "Cache-Control: no-cache" header to /xhr POST requests

This should not be required by the standard, but iOS 6 appears to need it. See
http://stackoverflow.com/questions/12506897/is-safari-on-ios-6-caching-ajax-results

To test this, run `make test_server` and serve this page from HTTP on localhost:

```html

SockJS test

```

When I load this page in Chrome, it displays "open" followed by "got: some data". When I open it in iOS 6 (eg, in the iOS 6 simulator) without my patch, it displays "open" followed by "closed". With the patch, iOS 6 correctly receives data.

It's a shame to add this theoretically-unnecessary header to all XHR requests just for one buggy OS, but it's a somewhat important OS!

It might be necessary to add it to other POSTs too, but xhr-streaming did appear to work without a similar patch.