http caching strong difference between firefox and chrome of

Recently reviewed HTTP caching knowledge, they noticed a problem, set up a strong cache and cache consultation document, refresh time performance in chrome and firefox is not the same. Specific performance chrome strong cache does not initiate the request again. firefox has made a request in the case of a strong cache does not fail to return the 304 to go consultations cache.

chrome request Screenshot:

chrome strong caching Screenshot

Screenshot firefox request:

Screenshot strong firefox cache

The performance of the above two diametrically opposed, but there is no error. The main reason is that the browser click the refresh button whether to use caching to achieve strong each time a different browser. Referring to FIG Pirates follows:

http cache implementation in various browsers

Test found that the firefox http cache in full compliance with the figure description, so it is not strong firefox cache invalidation, but it should have been ignored strong cache refresh. The chrome refresh also use a strong cache is an optimization of the http cache. So the two should be all right .

The results verify the removal of 304 at present is still very useful, and now most pages are engineered, packaged out of the file names are put on the hash, so long as the content has changed the file name will change, conversely file name has not changed then the content must not change, go to verify the 304 a lot less necessary.

About 304 non-essential details, please check the reference 1.

reference

[Translation] This adjustment allows network Facebook browser requests received reduced by 60%

A thorough understanding of the browser cache mechanism

http protocol request response header doubt parameters? ?

Browser cache mechanism

Published 48 original articles · won praise 52 · views 50000 +

Guess you like

Origin blog.csdn.net/letterTiger/article/details/93481350