xmlhttprequest

407 Proxy Authentication Required

强颜欢笑 提交于 2019-12-21 12:19:04
问题 I'm getting the following exception while making a call using XMLHttp object asynchronously in Mozilla Firefox. 407 Proxy Authentication Required The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. Description of cause: Actually I'm trying to make an asynchronous request to using get in javascript. It is working fine using IE 6 but for IE 7 and Firefox 3.5, it will it won't get any data using asynchronous request so how to overcome this

How to send arrays using XMLHttpRequest to server

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 09:22:09
问题 As I know using ajax you can send data to the server but I'm confused about sending an array to post using XMLHttpRequest not any library like jQuery. My question is that, is that possible to send an array to php using XMLHttpRequest and how does jQuery send an array to php, I mean does jQuery do any additional work to send an array to server (php $_POST) ? 回答1: Well you cannot send anything but a string of bytes. "Sending arrays" is done by serializing (making string representation of

prevent xmlHttpReq 's browser caching

孤街浪徒 提交于 2019-12-21 09:02:43
问题 It seems that all the browsers other than Opera cache XHR requests in my Javascript program. The URL in the XHR request refers to a CGI program on the server which generates a different output everytime its called. B Is there a way in Javascript to make the browser not cache XHR requests? 回答1: For every AJAX request you make, generate a unique value and add it to the ajax URL as a query parameter: /example/url/post.php?rand=09809807896768 I use to generate the current unix timestamp in JS and

Do current XHR implementations take advantage of HTTP/2?

允我心安 提交于 2019-12-21 07:17:57
问题 This may just highlight some misconception of mine, but I was curious: If you had an HTTP/2 server running and wanted to make XHR requests in the browser to the server, would XHR automatically take advantage of the performance optimisations in headers and such that it provides? Or would it ignore that functionality and operate as an HTTP request? If so, are there any things we can do to use the new optimisations in our requests? 回答1: You don't need to do anything. If the server supports HTTP

Chrome is not sending if-none-match

孤人 提交于 2019-12-21 06:58:47
问题 I'm trying to do requests to my REST API, I have no problems with Firefox, but in Chrome I can't get the browser to work, always throws 200 OK , because no if-none-match (or similar) header is sent to the server. With Firefox I get 304 perfectly. I think I miss something, I tried with Cache-Control: max-age=10 to test but nothing. 回答1: One reason Chrome may not send If-None-Match is when the response includes an "HTTP/1.0" instead of an "HTTP/1.1" status line. Some servers, such as Django's

Removing HTTP headers from an XMLHttpRequest

大兔子大兔子 提交于 2019-12-21 06:45:16
问题 I am working on an ajax long polling type application, and I would like to minimize the amount of bandwidth I am using. One of the big costs right now are the client side HTTP headers. Once I have a connection established and a session id stored on the client, I don't really want to squander any more bandwidth transferring redundant http information (such as browser type, accept encodings, etc.). Over the course of many connections, this quickly adds up to a lot of data! I would really like

Same origin policy — JavaScript calling PHP

和自甴很熟 提交于 2019-12-21 05:24:08
问题 I know that this is a popular topic, but I've yet to find an answer that's completely comprehensive. I'm trying to create a simple way for our 'customers' to place a Google Map on their website, which plots the position of our customers (or a subset thereof) on the map. The customers are in a MySQL database which is turned into XML on-the-fly by a PHP script (as per Google's example). This works fine on my website, but when I try it on another website the xmlHTTPRequest is not allowed to look

XmlHttpRequest in a bookmarklet returns empty responseText on GET?

丶灬走出姿态 提交于 2019-12-21 05:16:05
问题 I'm trying to build a javascript bookmarklet for a special URL shortening service we've built at http://esv.to for shortening scripture references (i.e. "Matthew 5" becomes "http://esv.to/Mt5". The bookmarklet is supposed to do a GET request to http://api.esv.to/Matthew+5, which returns a text/plain response of http://esv.to/Mt5 . The code for the bookmarklet itself looks like this (expanded for readability): var body = document.getElementsByTagName('body')[0], script = document.createElement

Posting Form Data to ZF2 Controller With Ajax

爷,独闯天下 提交于 2019-12-21 05:09:10
问题 EDIT- I have posted the answer below. The question is that I don't understand how/where ZF2 posts form data when a submit button is pressed. So, when I do if ($this->getRequest()->isPost()){ after the ajax call below, it tells me that no data has been posted. When I do the above isPost() if statement it works perfectly when I hit the submit button, telling me the data has been posted and subsequently telling me that the form data is valid. Here is the ajax call- <script> $.ajax({ url: urlform

XMLHttpRequest and Chrome developer tools don't say the same thing

江枫思渺然 提交于 2019-12-21 04:52:14
问题 I'm downloading a ~50MB file in 5 MB chunks using XMLHttpRequest and the Range header. Things work great, except for detecting when I've downloaded the last chunk. Here's a screenshot of the request and response for the first chunk. Notice the Content-Length is 1024 * 1024 * 5 (5 MB). Also notice that the server responds correctly with the first 5 MB, and in the Content-Range header, properly specifies the size of the entire file (after the / ): When I copy the response body into a text