页面何时加载? [英] When was the page loaded?

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

问题描述

有没有办法让书签知道,何时加载了页面

或刷新?如果有,怎么样? :)

解决方案

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 ... @nijlen.comwrote:


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...@nijlen.comwrote:

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.


这篇关于页面何时加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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