Questions tagged [xmlhttprequest-level2]

XMLHttpRequest Level 2 defines various new methods over XMLHttRequest level 1, such as the FormData object and new response types.

XMLHttpRequest level 2 adds new functionality over level 1, including:

See also

68 questions
4
votes
1 answer

How do you handle an "Access to restricted URI denied" error in JavaScript when using XMLHttpRequest?

I have the following code: var req = new XMLHttpRequest(); req.onload = function(){ if (req.status === "200"){ doSomethingWithTheReceivedData(); } else { alert("Error msg"); } }; However when running index.html…
4
votes
3 answers

Ajax File Upload working in Chrome but not in Firefox

Using XMLHttpRequest Level 2 I want to upload a File. I am using jQuery so I want to do it using jQuery in preference. So I wrote the following code (coffescript, but should be easily readable by anyone familiar with javascript) fileToUpload =…
Fernando
  • 2,131
  • 3
  • 27
  • 46
3
votes
1 answer

What is the maximum file upload size with xmlhttprequest level 2?

What is the maximum file upload size with xmlhttprequest level 2 with HTML5?
krunal shah
  • 16,089
  • 25
  • 97
  • 143
3
votes
1 answer

In CORS, Are POST request with credentials pre-flighted ?

In MDN Access Cotrol doc, GET request with credentials are not preflighted. But if response headers doesn't include Access-Control-Allow-Credentials: true then response will not be available to the invoking client. If this behaviour same for POST…
3
votes
1 answer

IE 11, XMLHttpRequest, xhr.upload no set in a Webworker

while trying to code an upload library in JavaScrupt I ended with a weird problem on IE 11. With XMLHttpRequest 2, you can upload files and get the progress. However, if you are trying to do so in a webworker, you won't get any progress from IE 11…
3
votes
0 answers

Unable to access partial video content through CORS to amazon EC2

I have tried my best to use the already available answers on stackoverflow for this and haven't been successful since 2 days . What I am trying to do is access a Mp4 video stored in amazon Ec2 instance . this results in XMLHttpRequest cannot load …
Altanai
  • 1,323
  • 1
  • 19
  • 33
3
votes
1 answer

IE11 - XMLHttpRequest level 2 onprogress event not triggered if chunk data bigger than 4kiB

I'm using XMLHTTPRequest level 2 to keep a sticky connection with the server. In IE10, Chrome and Firefox, every data chunk received is triggering the onprogress event as expected. However, on IE11, if the data chunk has more than 4kiB, the event is…
3
votes
1 answer

Accessing ArrayBuffer from PHP $_POST after xmlHTTPrequest send()

I'm following the tuitions on XMLHttpRequest 2 from : https://developer.mozilla.org/en/DOM/XMLHttpRequest/Sending_and_Receiving_Binary_Data and http://www.html5rocks.com/en/tutorials/file/xhr2/#toc-send-arraybuffer They're great tutorials for the…
Dan
  • 83
  • 1
  • 8
2
votes
0 answers

XMLHttpRequest upload progress event doesn't work in Firefox 10.0.2

I'm trying to create an ajax based upload form with progress bar. This is my code (the upload part of it): $xhr = new XMLHttpRequest(); $xhr.upload.addEventListener("progress", function(e) { if…
2
votes
1 answer

Is XMLHttpRequest responseType="document" supported in Google Chrome?

Information on Can I Use says that Chrome supports XMLHttpRequest Level 2. I used example from MDC in my Chrome extension: var xhr = new XMLHttpRequest(); xhr.onload = function() { alert(this.responseXML.title); } xhr.open("GET",…
Andrey Shchekin
  • 21,101
  • 19
  • 94
  • 162
2
votes
1 answer

Cross Site AJAX Call with XHR Level 2

This answer says that the XmlHttpRequestObject Level 2 supports cross-site ajax calls. I know a lot of browsers are supporting a lot of HTML5 features. Is this something Chrome or Firefox (or by some miracle IE) supports? If so, does jQuery…
Adam Rackis
  • 82,527
  • 56
  • 270
  • 393
2
votes
0 answers

XMLHttpRequest upload onprogress - request sent finishes too fast and spends too much time at TTFB

I have created an application to upload pictures for further processing. Everything works fine, except for the upload progress bar. function upload (fData) { $.ajax({ url: '@Url.Action("UploadFile", "Home")', type:…
steffan
  • 619
  • 1
  • 9
  • 18
2
votes
0 answers

How to receive & process data sent to php with XMLHttpRequest?

I'm working on upload form for mp3 files and I hit a wall :/. Can you help please? Here is my HTML:
Bruno
  • 21
  • 5
2
votes
1 answer

Reusing XMTHttpRequest object?

I am trying to rewrite some ajax code to make it fit better with the needs for autocomplete. In that situation you have to abort a previous request sometimes, xhr.abort(), so it feels rather natural to reuse that XMLHttpRequest object (which I just…
Leo
  • 4,136
  • 6
  • 48
  • 72
2
votes
1 answer

XMLHttpRequest.upload progress event only works in IE

I'm trying to mget the progression of an upload (that would only be an image btw). I used XMLHttpRequest and pretty much did like everyone else on the internet did,as follows: var upProgress = function(e) { console.log(e.loaded, e); }; var fd =…