Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

superagent-legacyiesupport-timeout

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

superagent-legacyiesupport-timeout

A plugin for the Superagent Javascript library to support cross domain requests on IE 8 & 9. Now on npm : https://www.npmjs.com/package/superagent-legacyiesupport.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

superagent-legacyIESupport

A plugin for the Superagent Javascript library to support cross domain requests on IE 8 & 9. Now on npm : https://www.npmjs.com/package/superagent-legacyiesupport.

Description

Surprise surprise, CORS requests don't work quite the same way in IE 8 & 9 as they do in other browsers, and they come with some extra restrictions. This is a nice page describing some of the finer details: http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx.

In a nutshell, CORS is implemented with its own XDomainRequest object, seperate from XMLHTTPRequest. As a bonus, it doesn't support sending cookies, at all, or custom headers, or any verbs other than GET and POST, and requests must be made to the same scheme as the current page.

Superagent out of the box does support making requests in IE 8 & 9 to origins on the same domain (which doesn't include sub domains by the way), and does support cross domain requests with CORS-supporting services on the other major browsers, including IE 10 & 11.

However, you'll need to do something similar to what this plugin does if you want to make cross domain requests on IE 8 & 9.

Also bear in mind, if you want to do any cross domain requests from any version of IE, your service will also need to supply a valid P3P header for IE to honour the response.

Have fun.

Usage

var request = require('superagent'),
    legacyIESupport = require('./superagent-legacyIESupport');

request
   .get(...)
   .use(legacyIESupport)
   .withCredentials() // this will be ignored if on IE 8 & 9
   .end(...);

FAQs

Package last updated on 07 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts