Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check content of preflight result cache in firefox

Tags:

cors

firefox

Does Firefox support http://www.w3.org/TR/cors/#preflight-result-cache and if yes:

  1. how to check its content?
  2. how to clear it separately from resources cache?
like image 477
Artem Oboturov Avatar asked May 30 '12 11:05

Artem Oboturov


1 Answers

Mozilla doesn't give much information, but it looks like it is cached, but that cache doesn't have a nice interface for clearing it. (https://bugzilla.mozilla.org/show_bug.cgi?id=803438 shows talking about changing the format of the cache list, so it must exist!)

Having said that, if you have control over the server, you can specify Access-Control-Max-Age to force a maximum lifespan. See https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS.

Also this answer to a related question says that Google Chrome limits the cache to 5 minutes: https://stackoverflow.com/a/12021982/1180785.

Update: Mozilla has a limit of 24 hours: http://monsur.hossa.in/2012/09/07/thoughts-on-the-cors-preflight-cache.html (the line number he links to is out-of-date; it's 844 now). Also looking through the code he references, it looks like it will be cleared when the browser closes, but there is no other way to clear it. I could be mistaken though.

like image 107
Dave Avatar answered Oct 01 '22 14:10

Dave