Difference between F5, Ctrl + F5 and click on refresh button?

后端 未结 6 1284
挽巷
挽巷 2021-01-30 12:46

I have often experienced while developing my web applications that pressing F5 or refresh doesn\'t produce or refresh the proper result. But when we hit Ctrl

相关标签:
6条回答
  • 2021-01-30 13:08

    I did small research regarding this topic and found different behavior for the browsers:

    enter image description here

    See my blog post "Behind refresh button" for more details.

    0 讨论(0)
  • 2021-01-30 13:15

    F5 and the refresh button will look at your browser cache before asking the server for content.

    Ctrl + F5 forces a load from the server.

    You can set content expiration headers and/or meta tags to ensure the browser doesn't cache anything (perhaps something you can do only for the development environment).

    0 讨论(0)
  • 2021-01-30 13:21

    F5 reloads the page from server, but it uses the browser's cache for page elements like scripts, image, CSS stylesheets, etc, etc. But Ctrl + F5, reloads the page from the server and also reloads its contents from server and doesn't use local cache at all.

    So by pressing F5 on, say, the Yahoo homepage, it just reloads the main HTML frame and then loads all other elements like images from its cache. If a new element was added or changed then it gets it from the server. But Ctrl + F5 reloads everything from the server.

    0 讨论(0)
  • 2021-01-30 13:23

    CTRL+F5 Reloads the current page, ignoring cached content and generating the expected result.

    0 讨论(0)
  • 2021-01-30 13:28

    F5 is a standard page reload.

    and

    Ctrl + F5 refreshes the page by clearing the cached content of the page.

    Having the cursor in the address field and pressing Enter will also do the same as Ctrl + F5.

    0 讨论(0)
  • 2021-01-30 13:31

    F5 triggers a standard reload.

    Ctrl + F5 triggers a forced reload. This causes the browser to re-download the page from the web server, ensuring that it always has the latest copy.

    Unlike with F5, a forced reload does not display a cached copy of the page.

    0 讨论(0)
提交回复
热议问题