Why does caching an HTML5 page prevent a Cors request from being executed?

Why does application caching prevent Cors request?

I have an example, two html pages are exactly identical, except for the second line:

index.html link

<!DOCTYPE html> <html manifest="main.appcache"> 

index2.html link

 <!DOCTYPE html> <html> 

Why does one manifest without work fine, and the manifest file only works for the first time and stops working when the application is cached? (press F5 repeatedly)

I tested with Firefox, Chrome and IE.

+5
source share
1 answer

According to this article

NETWORK: Files listed in this section may come from the network if they are not in the cache, otherwise the network will not be used, even if the user is connected to the network. Here you can specify specific white list URLs or simply “*”, which allows all URLs to be used. Most sites need a "*".

This behavior that you described is appropriate because your appcache manifest does not contain a NETWORK section.

Update: a request with an error - this is not CORS - because the domain, protocol, and port are the same.

+3
source

All Articles