Andy E

United Kingdom

whattheheadsaid.com

Age: 31

I'm mainly a JavaScript coder, with some experience in other languages.

May
22
awarded Nice Answer
May
22
awarded Enlightened
May
15
comment XHR responseType "ms-stream" failing on IE Mobile/Windows Phone 8.1
It's not the green tick, but I appreciate the time spent trying to help so the bounty is yours. Thanks again.
May
15
comment XHR responseType "ms-stream" failing on IE Mobile/Windows Phone 8.1
@Onur: unfortunately I can't use that because IE 11 doesn't support VBScript in edge mode.
May
13
comment XHR responseType "ms-stream" failing on IE Mobile/Windows Phone 8.1
@ProllyGeek: I've tried several different URLs across different domains and file types. If I thought the URL was relevant to the question, I would have included it.
May
13
comment XHR responseType "ms-stream" failing on IE Mobile/Windows Phone 8.1
The 2k prelude isn't an option as I don't control the environment serving the binary file. The blob response isn't usually available until the request has fully completed, but I will check Microsoft's implementation and see if it differs in that it's available at any time during the request. I only have access to a Windows Phone during office hours and I'm quite busy with other work too so I'm not sure when exactly I'll be able to test it but it will probably be today. Thanks for all your help so far.
May
13
comment XHR responseType "ms-stream" failing on IE Mobile/Windows Phone 8.1
@NotoriousPet0: it's a static binary file, so no PHP weirdness.
May
13
comment XHR responseType "ms-stream" failing on IE Mobile/Windows Phone 8.1
the status property is always 0, so that doesn't work either. The more I investigate the issue, the more I'm convinced that Windows Phone 8.1 has a bug that prevents 'ms-stream' being usable as a responseType XHR value.
May
12
comment XHR responseType "ms-stream" failing on IE Mobile/Windows Phone 8.1
Unfortunately, it still doesn't work for same domain requests. The semi-colon is fine at the end of the function expression (because it's an expression) and most linters pull you up for it not being there. Comet streaming is the method I'm currently using, but the only way to get the raw bytes is with the following trick: new VBArray(xhr.responseBody).toArray(). This is required for the transformation to an ArrayBuffer during each progress event and becomes slower as more data is downloaded.
May
12
comment XHR responseType "ms-stream" failing on IE Mobile/Windows Phone 8.1
@Notorious: I tested on Windows 7 with IE 11. It is cross domain (the target URL is on our CDN) but won't be when the code is in a production environment. If you're right and it works for same origin requests then I could live with the slowness seen in testing. I'm going to run some tests in the production environment and I'll let you know.
May
11
comment XHR responseType "ms-stream" failing on IE Mobile/Windows Phone 8.1
@shotgun unfortunately, I'm not aware of any way of accessing the raw bytes in IE from the responseText property. Other browsers allow you to specify x-user-defined as the charset, but IE doesn't support it. It supports the responseBody property, but the roundtrip conversion of every byte on every progress event means that the conversion process blocks the thread from running the code that does something with the data.
May
11
comment XHR responseType "ms-stream" failing on IE Mobile/Windows Phone 8.1
@shotgun the page and the data is exactly the same on both desktop and phone, and I've tried a small separate test on both and got the same results.
May
11
awarded Nice Question
May
10
answered Why embedding webpages doesn't work for all sites
May
9
comment How to set WebSocket Origin Header from Javascript?
+1 Using nginx is another good option, if a little more complex to set up than using a dedicated web debugging proxy.
May
9
answered How to set WebSocket Origin Header from Javascript?
May
7
revised Javascript navigator.cookieEnabled Browser Compatibility
Updated with new information
May
5
asked XHR responseType "ms-stream" failing on IE Mobile/Windows Phone 8.1
May
4
revised CSS 3.0 user-select property replacement
added 57 characters in body
Apr
30
awarded Critic
1 2 3 4 5