有没有办法告诉你何时重新加载网页 [英] Is there a way of telling when you reload a webpage

查看:67
本文介绍了有没有办法告诉你何时重新加载网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么更好的方法可以告诉您何时重新加载网站页面?

解决方案

请参阅我对该问题的评论。通常,您不需要告诉任何内容,因为重新加载整个页面总是意味着一个全新的页面。服务器端获取新的HTTP请求,客户端只是从头开始创建(基于刚收到的HTTP响应),因此它将是Javascript处理的第一个事件。这个问题可能是基于对Web对页面的影响的误解。如果事情还不清楚,你应该更详细地问这个问题,解释你想要达到的目标。



-SA

Is there a better way of telling when you reload a website page?

解决方案

Please see my comment to the question. Normally, you don't need to "tell" anything, because reloading a whole page always means a brand new page. Server side gets a new HTTP request, and client side is just created from scratch (based on HTTP response just received), so it would be the first event Javascript handles. It is possible that the question is based on misunderstanding of what Web does to a page. If things are not still clear, you should ask this question with some more detail, explaining what do you want to achieve.

—SA


这篇关于有没有办法告诉你何时重新加载网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆