This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Caută ajutor

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Află mai multe

Acest fir de discuție a fost arhivat. Adresează o întrebare nouă dacă ai nevoie de ajutor.

Cross-domain POST XMLHTTPrequest with CORS throws Error loading content (NS_ERROR_DOCUMENT_NOT_CACHED).How to fix this in Firefox 28.0?

  • 1 răspuns
  • 2 au această problemă
  • 10 vizualizări
  • Ultimul răspuns de guigs

more options

I cannot do POST XMLHTTPrequest with CORS. GET request is ok, but my POST request throws Error loading content (NS_ERROR_DOCUMENT_NOT_CACHED) as HTTPfox says. I send just a string like "helloworld" and so there should be no content-type problems.

Request Header:

(Request-Line)	GET /receive-data.php HTTP/1.1
Host --------myhost-------------
User-Agent	Mozilla/5.0 (X11; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0
Accept	text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language	en-US,en;q=0.5
Accept-Encoding	gzip, deflate
Connection	keep-alive
Cache-Control	max-age=0
Pragma  no-cache
Cache-Control no cache

Response Header:

(Status-Line)	HTTP/1.1 200 OK
Date	Tue, 15 Apr 2014 19:06:39 GMT
Server	Apache
X-Powered-By	PHP/5.2.17
Access-Control-Allow-Origin	*
Access-Control-Allow-Methods	OPTIONS, GET, POST, PUT
Keep-Alive	timeout=5, max=100
Connection	Keep-Alive
Transfer-Encoding	chunked
Content-Type	text/html
I cannot do POST XMLHTTPrequest with CORS. GET request is ok, but my POST request throws Error loading content (NS_ERROR_DOCUMENT_NOT_CACHED) as HTTPfox says. I send just a string like "helloworld" and so there should be no content-type problems. Request Header: <pre><nowiki>(Request-Line) GET /receive-data.php HTTP/1.1 Host --------myhost------------- User-Agent Mozilla/5.0 (X11; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-US,en;q=0.5 Accept-Encoding gzip, deflate Connection keep-alive Cache-Control max-age=0 Pragma no-cache Cache-Control no cache</nowiki></pre> Response Header: <pre><nowiki>(Status-Line) HTTP/1.1 200 OK Date Tue, 15 Apr 2014 19:06:39 GMT Server Apache X-Powered-By PHP/5.2.17 Access-Control-Allow-Origin * Access-Control-Allow-Methods OPTIONS, GET, POST, PUT Keep-Alive timeout=5, max=100 Connection Keep-Alive Transfer-Encoding chunked Content-Type text/html</nowiki></pre>

Modificat în de cor-el

Toate răspunsurile (1)

more options

Cache-Control max-age=0 ? If you change that value in a header editor, does the error still occur?

I think this add on allows you to do this? https://addons.mozilla.org/en-US/fire.../?src=search