Search Support

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.

Learn More

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

  • 1 பதிலளி
  • 2 இந்த பிரச்னைகள் உள்ளது
  • 10 views
  • Last reply by guigs

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>

cor-el மூலமாக திருத்தப்பட்டது

All Replies (1)

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