Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Learn More

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

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

  • 1 risposta
  • 2 hanno questo problema
  • 10 visualizzazioni
  • Ultima risposta di 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>

Modificato da cor-el il

Tutte le risposte (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