» Fig Leaf Software Home

We've Got You Covered.

Wednesday, December 11, 2013

The Agony and the Ecstasy of Ext 4, IE 8, and CORS

We are currently working on an Ext 4 project that makes cross-domain requests to a .NET server. One of the restrictions on the app is that it must work with Satan’s favorite browser – IE 8.
Normally, this isn’t a huge challenge – but in this case, we’re working in a mixed environment – users actually login to a ColdFusion server (www.client.org), however, the webservices supporting our Ext app are running on a subdomain (e.g. webservices.client.org) in a .NET environment.
Rather than using JSON-P based services, we decided to go with a CORS-based solution. Users receive a domain-cookie from the ColdFusion server, which would be transparently passed to the .NET webserver. The .NET server, in turn, makes a callback to the CF server to validate the session.
By default, Ext 4 will *not* transmit cookies on AJAX requests. The key to solving this particular issue was to override the Ext.data.Connection class and force the withCredentials property to true.
1
2
3
4
Ext.define('MyApp.override.DataConnection', {
 override: 'Ext.data.Connection',
 withCredentials: true
});

So that worked great in Chrome…and every other browser…except the hellspawn.

To discover how to make CORS requests from Ext in an IE 8 environment, read the full article here: The Agony and Ecstasy of Ext 4, IE 8, and CORS 

No comments:

Post a Comment

About Us

Fig Leaf Software is an award-winning team of imaginative designers, innovative developers, experienced instructors, and insightful strategists.

For over 20 years, we’ve helped a diverse range of clients...

Read More

Contact Us

202-797-7711

Fig Leaf Software

1400 16th Street NW
Suite 450
Washington, DC 20036

info@figleaf.com