Is only F5 in the browser to refresh the interface?

The road is hindered and long, and the line is coming. Keep your head down and work hard, if you don't talk, you will be a blockbuster! Come on, Sao Nian!

background

  Today, when I use Google browser to visit the CSDN forum, there is an icon that feels abnormal, but no matter how I refresh it, it is useless.

My local icon display

  When I thought I found a BUG in CSDN and happily gave feedback to the customer service, the customer service told me that his side was normal, and I was puzzled.

CSDN customer service gave me the display

  When I was puzzled, the customer service suggested that I use Ctrl + F5 to force a refresh to try. I tried it, eh, it seems really good! So I fell into deep thought again. What is the difference between the refresh (F5) I used and the forced refresh (Ctrl + F5) recommended by the customer service?

Initial understanding

  I simply searched for the answer from the Internet. In summary, I found that it probably meant the following two meanings

  • F5 refresh: usually just refresh the local cache;
  • Ctrl + F5 Forced refresh: You can delete temporary files and download them from the server again, that is, completely refresh the page.

  At this point, I basically understand some tricks. I summarized it myself. It is probably to use F5 to refresh, which will only clean up "temporary workers" and reload; while using Ctrl + F5 to force refresh is to combine "long-term workers" with "Temporary workers" are all cleared, and then all are re-acquired.

Deep understanding

  I still feel a little dissatisfied, so I continued to dig deeper and started to check the information. This article gave me some ideas. Refer to the link: Short book: F5 refresh and Ctrl+F5 refresh ;

  In the Google browser, use the Ctrl + Shift + I shortcut to open the developer tools , or you can open the developer tools as shown in the figure below.

  I just opened the interface, there is nothing, after I refreshed with F5, I saw a different content

  From the picture above, I saw a lot of pictures similar to PNG, and I saw some different displays in the Size tab. I clicked on the last picture in the red box on the left, and after opening it, it looks like a picture on this website. .

  Then in the red box on the right, I saw some tips about Size, there are probably the following two

  • memory cache: Memory cache is temporarily stored in the memory. When you close the page or close the software, these resources will be released; in this way, I can understand that every time you refresh, the content will be reloaded again, because it is What is stored in the memory is only temporarily saved, which is equivalent to the "temporary worker" understood before.
  • disk cache: Disk cache, this is equivalent to storing in the hard disk of our computer, closing the page, these resources will not be released; oh~, it turned out to be like this, when I press F5 to refresh before, these things will not be It is reloaded, but will be read directly from the disk. It is equivalent to the previously understood "long-term work".

Test verification

  After understanding the above conclusion, I decided to try it myself.

  • Initial interface

  • Using the refreshed interface of F5, I found that most of the PNG format files are still obtained from the memory cache , and there is no need to reload it from the server.

  • Use Ctrl + F5 to refresh the interface, you can see that many files have been reloaded, such as PNG format picture files.

Summary of results

  When you encounter some interfaces, if you use F5 to refresh, you can try to use "Ctrl + F5" to force a refresh.

  The browser itself also has a forced refresh function. Take Google browser as an example, you can refer to this website: Chrome DevTools: Keyboard Shortcuts , summarize the relevant content as follows

Global shortcut keys Windows Mac
refresh page F5、Ctrl + R Cmd + R
Refresh pages that ignore cached content Ctrl + F5、Ctrl + Shift + R Cmd + Shift + R

If the content of the article is wrong, please comment / private message a lot of advice, thank you! If you think the content of the article is not bad, remember to click three links (like, bookmark, leave a message), your support is my greatest encouragement, thank you!

Guess you like

Origin blog.csdn.net/Fighting_Boom/article/details/107533973