What's the difference between a “GET” request and a “page refresh”?

冷暖自知 提交于 2020-01-06 05:00:54

问题


Is there any difference between doing a "GET" request (type URL and Enter) compared to simply refreshing (CtrlR) the page?


回答1:


No, it is not simply a get request, because on a page that you've POSTed to (from a separate form), the browser will confirm with you that you want to refresh the page because it is a POST request.

As for your question, you'll need to provide specifics for debugging purposes.




回答2:


It is simply telling the browser to repeat the page load, which implies repeating the GET or POST request. Some browsers will inform the server that 304 (not-modified) is an acceptable response, and the server can reply with a 304 HTTP response to inform the browser that it's cached contents are valid




回答3:


Most browsers ignore the Expires header if we do a "page refresh", yet respect it if we do a "url visit".

However, different browsers have their own way of differentiating "refresh" and "url visit", the only way to be sure is to manually test each one of them.



来源:https://stackoverflow.com/questions/6638087/whats-the-difference-between-a-get-request-and-a-page-refresh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!