You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cross-origin-long-polling transport issues an OPTIONS request before every long-polling POST request. This is because the 'Pragman: no-cache' header is being set on the XHR object by the client.
Is there a specific reason this header has to be set? It would be great if we could either remove it, or add an option that allows one to opt-out of setting this header.
The text was updated successfully, but these errors were encountered:
Send Pragma: no-cache with XHR requests to guard against iOS 6 POST caching
Would it be possible to instead add something to the query string to prevent caching?
For our usecase we would also be fine just having a way to opt out of setting the header, since the overhead of an additional OPTIONS request seems rather large considering it's to circumvent buggy behaviour of a single client.
I don't have any devices available to me to check this now, but from a little googling it seems like the only fix known at the time was to use cache control headers, rather than query strings. If you do find out that query strings are sufficient to prevent this error, I'll happily remove the header.
However, it's worth noting in relation to #466, for us to use the regular long-polling transport for cross-origin requests to other Bayeux servers, we'd need to set Content-Type: application/json, which would also trigger a pre-flight request.
Does the access-control-max-age header not prevent your client from making repeated OPTIONS requests?
The cross-origin-long-polling transport issues an OPTIONS request before every long-polling POST request. This is because the 'Pragman: no-cache' header is being set on the XHR object by the client.
Is there a specific reason this header has to be set? It would be great if we could either remove it, or add an option that allows one to opt-out of setting this header.
The text was updated successfully, but these errors were encountered: