Performance – Why is all refreshed [F5], then enter and press Enter from the address bar?

I have benchmarked my application, and I found one thing that surprised me. I hope it is clear why the two are different things.

< /p>

Press in the address bar, and then enter within 1.5 to 3 seconds to open my page)

If I press the refresh button in Firefox, it takes a long time and then press Enter ( (3 to 6 seconds)

I really don’t know what’s the matter here. The refresh button doesn’t get images, css or js from the cache.

Someone specified me what’s the matter here.

The HTTP request sent is different. By pressing the Enter key, you can tell the browser to navigate to a certain Page and apply regular resource caching behavior (just like clicking a link). This means that a linked CSS file that is generated on the server and sent in 2 seconds: “Max-Age: 1 year” header, if it is in the local cache If available, you will not get it again.

Using F5, you explicitly tell the browser to refresh the resources used on the page. Image/css/js files are usually requested again, and the “If -Modified-Since” or “If-None-Match” header to get the resource.

I don’t think this is part of any specification, but if the web developer sees server resource changes reflected, regardless of cache Regardless of the rules, it makes sense.

I have benchmarked my application, and I found one thing that surprised me, I I hope it is clear why the two are different things.

Press in the address bar, and then press 1.5 to 3 seconds to enter to open my page)

If I press The refresh button in Firefox takes a long time and then press enter (3 to 6 seconds)

I really don’t know what’s going on here. The refresh button does not get images from the cache, css or js. < /p>

Someone specified me what is the relationship here.

The HTTP request sent is different. By pressing the Enter key, you can tell the browser to navigate to A certain page and apply regular resource caching behavior (just like clicking a link). This means that a linked CSS file that is generated on the server and sent in 2 seconds: “Max-Age: 1 year” header, if it is locally If it is available in the cache, it will not be retrieved again.

Using F5, you explicitly tell the browser to refresh the resources used on the page. Usually you will ask again Ask for image/css/js files, and will not use “If-Modified-Since” or “If-None-Match” headers to get resources.

I don’t think this is part of any specification, but If web developers see server resource changes reflected, it makes sense regardless of the caching rules.

Leave a Comment

Your email address will not be published.