Reader small image

You're reading from  CORS Essentials

Product typeBook
Published inMay 2017
Reading LevelIntermediate
Publisher
ISBN-139781784393779
Edition1st Edition
Languages
Right arrow
Author (1)
Rajesh Gunasundaram
Rajesh Gunasundaram
author image
Rajesh Gunasundaram

Rajesh Gunasundaram is a software architect, technical writer and blogger. He has over 15 years of experience in the IT industry, with more than 12 years using Microsoft .NET, 2 years of BizTalk Server and a year of iOS application development. Rajesh is a founder and editor of technical blogs programmerguide and ioscorner and you can find many of his technical writings on .Net and iOS. He is also the founder and developer of VideoLens, a platform that analyses videos uploaded in Facebook pages and YouTube channels. Rajesh has also written four other books for Packt publishing. Rajesh worked on client premises located at various countries such as UK, Belarus and Norway. He also has experience in developing mobile applications for iPhone and iPad. His technical strengths include Azure, Xamarin, ASP.NET MVC, Web API, WCF, .Net Framework / .Net Core, C#, Objective-C, Angular, Bot Framework, BizTalk, SQL Server, REST, SOA, Design Patterns and Software Architecture. Rajesh is an early adopter of Angular since AngularJS. He has developed Rich interfaces using Angular, Bootstrap, HTML5 and CSS3. He has good experience in translation of designer mock-ups and wireframes into an AngularJS front-end. Good at unit testing Angular applications with Karma. Expertise in handling RESTful services in Angular. Supporting various web products developed using AngularJS and Angular.
Read more about Rajesh Gunasundaram

Right arrow

CORS in Windows browsers – Internet Explorer and Edge


The good news is that Edge, the browser that ships with Windows 10, and Internet Explorer 10 fully support the W3C specification for CORS, and you can use standard techniques with XmlHttpRequest (XHR) and CORS headers. Internet Explorer 7 and older versions do not support CORS at all.

According to Can I Use... (as of August 2015), CORS is supported by 97.69% of browsers in the USA and 92.76% globally. For more information about CORS support in browsers, see the Can I Use... page for CORS: .

In Internet Explorer 8 and 9, you have to use feature detection and XDomainRequest instead of XHR. We covered using XDomainRequest in Chapter 1, Why You Need CORS.

The following example shows how to detect XHR withCredentials and XDomainRequest support. If a new XmlHttpRequest has "withCredentials", then CORS is supported; if the window has XDomainRequest, then that method is supported; if neither is present, you cannot use CORS:

function browserSupportsCors...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
CORS Essentials
Published in: May 2017Publisher: ISBN-13: 9781784393779

Author (1)

author image
Rajesh Gunasundaram

Rajesh Gunasundaram is a software architect, technical writer and blogger. He has over 15 years of experience in the IT industry, with more than 12 years using Microsoft .NET, 2 years of BizTalk Server and a year of iOS application development. Rajesh is a founder and editor of technical blogs programmerguide and ioscorner and you can find many of his technical writings on .Net and iOS. He is also the founder and developer of VideoLens, a platform that analyses videos uploaded in Facebook pages and YouTube channels. Rajesh has also written four other books for Packt publishing. Rajesh worked on client premises located at various countries such as UK, Belarus and Norway. He also has experience in developing mobile applications for iPhone and iPad. His technical strengths include Azure, Xamarin, ASP.NET MVC, Web API, WCF, .Net Framework / .Net Core, C#, Objective-C, Angular, Bot Framework, BizTalk, SQL Server, REST, SOA, Design Patterns and Software Architecture. Rajesh is an early adopter of Angular since AngularJS. He has developed Rich interfaces using Angular, Bootstrap, HTML5 and CSS3. He has good experience in translation of designer mock-ups and wireframes into an AngularJS front-end. Good at unit testing Angular applications with Karma. Expertise in handling RESTful services in Angular. Supporting various web products developed using AngularJS and Angular.
Read more about Rajesh Gunasundaram