tags:

views:

1429

answers:

5

What is the difference between an F5 (refresh) of a page and pasting that URL in a new window and clicking enter?

Any help is appreciated

A: 

Hitting Ctrl-F5 will clear your local (ie. the browser's cache) of any files for that site. Whereas simply opening the site in a new tab will load any files from the cache first.

jtyost2
Do you have any citation for the clearing of the cache? Unless you're thinking of CTRL-F5, I think you're wrong about that.
John Saunders
You are right, moment of craziness apparently.
jtyost2
+2  A: 

When you hit refresh (F5) the browser will ask you e.g. if you want to also send POST request (for example if you previously entered some data on a form). If you paste url and press enter you won't be able to resend mentioned POST data.

empi
+2  A: 

Refreshing a page does NOT explicitly refresh your cache. It will do a fresh GET, but anything cached stays cached. If you hit CTRL-F5, however, you'll refresh with a cache.

Copy and pasting will just get another fresh copy of the site with a GET, not ignoring cache.

Tony k
A: 

It would depend on a lot of things. For most sites, copying the url to a new window or tab will start a new session, where a refresh would maintain the current session.

Jason
A: 

It depends on the caching policy for the page and the method used for fetching the page in the first place. If you fetched the page via a POST, a refresh will re-send the POST data while putting the URL in a new window will issue a GET to the server.

If the original request is a GET, the behaviour depends on how the current page is cached. Hitting refresh will cause the browser to check back with the server for the page (but not necessarily any scripts or images). If the page is set to be cacheable then pasting the URL in a new window might well just pull the page out of cache without hitting the server.

Note that checking with the server won't necessarily cause the page to be regenerated or redownloaded as the browser can issue a conditional GET or a HEAD request to check whether the page has actually changed since last fetched. Also, while some of the actions might pull the page from the cache, there's no guarantee it will (and dynamically generated pages usually have to be set up properly to be considered cacheable at all).

Andrew Aylett

related questions