页面何时加载?

编程入门 行业动态 更新时间:2024-10-24 12:21:29
本文介绍了页面何时加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有没有办法让书签知道,何时加载了页面 或刷新?如果有,怎么样? :)

解决方案

optimistx写道:

有没有办法让书签来知道,当页面正好加载 或刷新?

不太可能。 PoinetdEars - 现实主义:HTML 4.01严格 福音传播:XHTML 1.0严格 疯狂:XHTML 1.1作为应用程序/ xhtml + xml - Bjoern Hoehrmann

optimistx写道:

有没有办法让书签知道,何时加载了页面 还是神清气爽?如果有,怎么样?

首次加载页面时显示应该没问题。只需 在用户第一次访问时存储一个cookie并带有日期,然后 然后在每次下次访问时读出它。这里的问题是刷新。 也许更好的是服务器端解决方案(例如PHP),让它生成 的日期,把它放在一个js变量中,并在 书签中显示该变量。这样也可以包括刷新。 希望这会有所帮助, - Bart

8月4日上午10:42 *,Bart Van der Donck< b ... @nijlenwrote:

optimistx写道:

有没有办法让书签知道,何时加载页面 或刷新?如果有,怎么样?

首次加载页面时显示应该没问题。只需 在用户第一次访问时存储一个cookie并带有日期,然后 然后在每次下次访问时读出它。这里的问题是刷新。 也许更好的是服务器端解决方案(例如PHP),让它生成 的日期,把它放在一个js变量中,并在 书签中显示该变量。这样刷新也应该包括在内。 希望这会有所帮助, - * Bart

或保留两个cookie。第一个(第一次加载)只会更新,如果它没有... b $ b不存在...第二次(最后一次刷新)在每次加载时更新 是否存在或没有。

Is there a way for a bookmarklet to know, when exactly the page was loaded or refreshed? If yes, how? :)

解决方案

optimistx wrote:

Is there a way for a bookmarklet to know, when exactly the page was loaded or refreshed?

Unlikely. PoinetdEars -- realism: HTML 4.01 Strict evangelism: XHTML 1.0 Strict madness: XHTML 1.1 as application/xhtml+xml -- Bjoern Hoehrmann

optimistx wrote:

Is there a way for a bookmarklet to know, when exactly the page was loaded or refreshed? If yes, how?

It should be no problem to show when the page was first loaded. Just store a cookie at the first visit of the user with the date in it, and then read it out at every next visit. The problem here is the refresh. Perhaps better is a server-side solution (eg. PHP), let it generate the date, put it in a js variable, and show that variable in the bookmarklet. This way the refresh should also be included. Hope this helps, -- Bart

On Aug 4, 10:42*am, Bart Van der Donck <b...@nijlenwrote:

optimistx wrote:

Is there a way for a bookmarklet to know, when exactly the page was loaded or refreshed? If yes, how?

It should be no problem to show when the page was first loaded. Just store a cookie at the first visit of the user with the date in it, and then read it out at every next visit. The problem here is the refresh. Perhaps better is a server-side solution (eg. PHP), let it generate the date, put it in a js variable, and show that variable in the bookmarklet. This way the refresh should also be included. Hope this helps, -- *Bart

Or keep two cookies. The first (first loaded) only gets updated if it doesn''t exist...the second (last refresh) gets updated on each load whether it exists or not.

更多推荐

页面何时加载?

本文发布于:2023-11-13 10:38:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584153.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加载   页面

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!