Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Headers and status can be quite valuable. For example, consider HTTP/1.1 200 OK vs HTTP/1.1 403 Forbidden after using new Image().src="http://example.com/login?user=username&password=brute" (simple example to demonstrate my point, complexity may differ in real-world cases). Commented Jul 26, 2013 at 10:49
  • @RobW in that case yes, but with an XMLHttpRequest the OPTIONS request will be doing more than a HEAD request, so why is it blocked for that? Commented Jul 26, 2013 at 12:18
  • @lain The OPTIONS request is initiated by the browser, not by the script. When the response doesn't contain the expected CORS headers, the full request is aborted. Note that OPTIONS request is not visible to the caller, so no information is leaked. Commented Jul 26, 2013 at 12:47
  • @Iain, are you concerned that HEAD is not treated as a simple request verb? Point #1 in the answer you quote is actually incomplete; the simple request verbs include GET, POST, and HEAD. Commented Jul 26, 2013 at 13:26
  • @aspillers I was unaware that answer was complete, thanks. Yes, basically :) Commented Jul 26, 2013 at 14:13