Opened 7 years ago

Closed 4 years ago

#17020 closed defect (fixed)

[patch] XHR over file:// fails for IE >=9

Reported by: vita Owned by: dylan
Priority: undecided Milestone: 1.8.11
Component: IO Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

Split from #17015.

Because IE 9 and upper supports addEventListener xhr for the file:// protocol failed. See attached patch.

Attachments (4)

xhr.js.patch (289 bytes) - added by bill 7 years ago.
patch from vita
dojo.patch (749 bytes) - added by vita 7 years ago.
dojo.js patch IE9 file:// support
xhr.js.2.patch (745 bytes) - added by vita 7 years ago.
xhr.js patch IE9 file:// support
test.zip (710 bytes) - added by vita 7 years ago.
testing example

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by bill

Attachment: xhr.js.patch added

patch from vita

comment:1 Changed 7 years ago by bill

Summary: IE XHR detection fails for IE>=9[patch] XHR over file:// fails for IE >=9

comment:2 Changed 7 years ago by Bryan Forbes

First of all, is this needed? Developers should not be using the file protocol on newer browsers because of the restrictions put on XMLHttpRequest in those browsers. In fact, according to Rawld's comments on #17015, the file protocol doesn't work in IE9. Second, the addition of a browser sniff is completely unneeded: the first use is basically a duplicate of the has('activex') check, and the second change should be using dojo-force-activex-xhr test instead of using a sniff. Third, please submit patches in unified diff format (svn diff and git diff should output unified diff by default). I'm keeping this open for now, but will most likely close this as wontfix because developers should not be using the file protocol in newer browsers even though it was supported in older browsers. I will also close this as wontfix if #17015 is true and the file protocol will not work at all in IE9.

comment:3 Changed 7 years ago by pykaso

Our JS client is using both .. http and file protocol. It can run in offline mode. Why we should not be using the file protocol? Are we evil?

comment:4 Changed 7 years ago by vita

File protocol work in IE9 and above. Here are two patches and testing file, which demonstrate the functionality. I remove double sniffing of IE to. Sources base is version 1.9.0RC2.

Changed 7 years ago by vita

Attachment: dojo.patch added

dojo.js patch IE9 file:// support

Changed 7 years ago by vita

Attachment: xhr.js.2.patch added

xhr.js patch IE9 file:// support

Changed 7 years ago by vita

Attachment: test.zip added

testing example

comment:5 Changed 4 years ago by dylan

Milestone: tbd1.11
Owner: changed from Bryan Forbes to dylan
Status: newassigned
Note: See TracTickets for help on using tickets.