我如何找到网页最后更新的时间?

时间:2021-11-09 06:33:52

Is there a way to find out how much time has passed since a web page was changed?

是否有一种方法可以发现自web页面发生更改以来已经过了多长时间?

For example, I have a page hosted at: www.mywebsitenotupdated.com

例如,我有一个位于:www.mywebsitenotupdated.com的页面

Is there a way to find out when this html page was uploaded to server?

有没有办法知道这个html页面什么时候被上传到服务器?

Very important, I have no access to server; just a link to webpage.

非常重要的是,我无法访问服务器;只是链接到网页。

6 个解决方案

#1


57  

No, you cannot know when a page was last updated or last changed or uploaded to a server (which might, depending on interpretation, be three different things) just by accessing the page.

不,您不能仅通过访问页面就知道页面最后一次更新、最后一次更改或上载到服务器(根据不同的解释,这可能是三件不同的事情)。

A server may, and should (according to the HTTP 1.1 protocol), send a Last-Modified header, which you can find out in several ways, e.g. using Rex Swain’s HTTP Viewer. However, according to the protocol, this is just “the date and time at which the origin server believes the variant was last modified”. And the protocol realistically adds: “The exact meaning of this header field depends on the implementation of the origin server and the nature of the original resource. For files, it may be just the file system last-modified time. For entities with dynamically included parts, it may be the most recent of the set of last-modify times for its component parts. For database gateways, it may be the last-update time stamp of the record. For virtual objects, it may be the last time the internal state changed.”

服务器可以,也应该(根据HTTP 1.1协议)发送最后修改的报头,您可以通过几种方式找到,例如使用Rex Swain的HTTP查看器。然而,根据协议,这只是“起源服务器认为该变体最后被修改的日期和时间”。协议还实际地补充说:“这个头字段的确切含义取决于源服务器的实现和原始资源的性质。对于文件,它可能只是文件系统最后修改的时间。对于具有动态包含部件的实体,它可能是其组件部件的最后修改时间集合中最近的一次。对于数据库网关,它可能是记录的最后更新时间戳。对于虚拟对象,可能是内部状态发生变化的最后一次。

In practice, web pages are very often dynamically created from a Content Management System or otherwise, and in such cases, the Last-Modified header typically shows a data stamp of creating the response, which is normally very close to the time of the request. This means that the header is practically useless in such cases.

实际上,web页面通常是由内容管理系统或其他系统动态创建的,在这种情况下,最后修改的头通常显示创建响应的数据戳,这通常非常接近请求的时间。这意味着在这种情况下,header实际上是无用的。

Even in the case of a “static” page (the server simply picks up a file matching the request and sends it), the Last-Modified date stamp normally indicates just the last write access to the file on the server. This might relate to a time when the file was restored from a backup copy, or a time when the file was edited on the server without making any change to the content, or a time when it was uploaded onto the server, possibly replacing an older identical copy. In these cases, assuming that the time stamp is technically correct, it indicates a time after which the page has not been changed (but not necessarily the time of last change).

即使在“静态”页面的情况下(服务器只是获取与请求匹配的文件并将其发送),最后修改的日期戳通常只指示对服务器上的文件的最后一次写访问。这可能涉及到文件从备份副本中恢复的时间,或者是在服务器上编辑文件而没有对内容进行任何更改的时候,或者是将文件上载到服务器上的时间,可能会替换旧的相同副本。在这些情况下,假设时间戳在技术上是正确的,它表示页面未被更改(但不一定是最后更改的时间)的时间。

#2


44  

Open your browsers console(?) and enter the following:

打开浏览器控制台(?),输入以下内容:

javascript:alert(document.lastModified)

#3


4  

For checking the Last Modified header, you can use httpie (docs).

为了检查最后修改过的头,可以使用httpie (docs)。

Installation

pip install httpie --user

Usage

$ http -h https://martin-thoma.com/author/martin-thoma/ | grep 'Last-Modified\|Date'
Date: Fri, 06 Jan 2017 10:06:43 GMT
Last-Modified: Fri, 06 Jan 2017 07:42:34 GMT

The Date is important as this reports the server time, not your local time. Also, not every server sends Last-Modified (e.g. superuser seems not to do it).

日期很重要,因为它报告服务器时间,而不是本地时间。而且,并不是每个服务器都发送Last-Modified(例如,超级用户似乎不发送)。

#4


4  

There is another way to find the page update which could be useful for some occasions (if works:).

还有一种方法可以找到页面更新,这在某些情况下是有用的(如果有用的话)。

If the page has been indexed by Google, or by Wayback Machine you can try to find out what date(s) was(were) saved by them (these methods do not work for any page, and have some limitations, which are extensively investigated in this webmasters.stackexchange question's answers. But in many cases they can help you to find out the page update date(s):

如果该页面已被谷歌或Wayback机器索引,您可以尝试找出它们保存的日期(这些方法对任何页面都不起作用,并且有一些限制,这些限制在本网站管理员中被广泛研究。课件的问题的答案。但在许多情况下,它们可以帮助您查找页面更新日期:

  1. Google way: Go by link https://www.google.com.ua/search?q=site%3Awww.example.com&biw=1855&bih=916&source=lnt&tbs=cdr%3A1%2Ccd_min%3A1%2F1%2F2000%2Ccd_max%3A&tbm=
    • You can change text in search field by any page URL you want.
    • 您可以通过任何您想要的页面URL更改搜索字段中的文本。
    • For example, the current * question page search gives us as a result May 14, 2014 - which is the question creation date: 我如何找到网页最后更新的时间?
    • 例如,当前的*问题页面搜索结果是2014年5月14日,也就是问题创建日期:
  2. 方法:点击链接https://www.google.com.ua/search?例如,当前的*问题页面搜索结果是2014年5月14日,也就是问题创建日期:
  3. Wayback machine way: Go by link https://web.archive.org/web/*/www.example.com
    • for this * page wayback machine gives us more results: Saved 6 times between June 7, 2014 and November 23, 2016., and you can view all saved copies for each date
    • 这台*页面回传机提供了更多的结果:从2014年6月7日到2016年11月23日,保存了6次。,您可以查看每个日期的所有保存副本。
  4. 回程机方式:通过链接https://web.archive.org/web/*/www.example.com,这台*页面回程机提供了更多的结果:在2014年6月7日到2016年11月23日之间保存了6次。,您可以查看每个日期的所有保存副本。

#5


0  

I have written a blog about this, which shows some simple steps to check the date and time of your website last updated. https://sachinapatel.wordpress.com/ You can check it on the first blogpost

我写了一篇关于这个的博客,它展示了一些简单的步骤来检查你的网站最近更新的日期和时间。https://sachinapatel.wordpress.com/你可以在第一个博客上看到

#6


-1  

For me it was the

对我来说是

article:modified_time

in the page source.

在页面的来源。

我如何找到网页最后更新的时间?

#1


57  

No, you cannot know when a page was last updated or last changed or uploaded to a server (which might, depending on interpretation, be three different things) just by accessing the page.

不,您不能仅通过访问页面就知道页面最后一次更新、最后一次更改或上载到服务器(根据不同的解释,这可能是三件不同的事情)。

A server may, and should (according to the HTTP 1.1 protocol), send a Last-Modified header, which you can find out in several ways, e.g. using Rex Swain’s HTTP Viewer. However, according to the protocol, this is just “the date and time at which the origin server believes the variant was last modified”. And the protocol realistically adds: “The exact meaning of this header field depends on the implementation of the origin server and the nature of the original resource. For files, it may be just the file system last-modified time. For entities with dynamically included parts, it may be the most recent of the set of last-modify times for its component parts. For database gateways, it may be the last-update time stamp of the record. For virtual objects, it may be the last time the internal state changed.”

服务器可以,也应该(根据HTTP 1.1协议)发送最后修改的报头,您可以通过几种方式找到,例如使用Rex Swain的HTTP查看器。然而,根据协议,这只是“起源服务器认为该变体最后被修改的日期和时间”。协议还实际地补充说:“这个头字段的确切含义取决于源服务器的实现和原始资源的性质。对于文件,它可能只是文件系统最后修改的时间。对于具有动态包含部件的实体,它可能是其组件部件的最后修改时间集合中最近的一次。对于数据库网关,它可能是记录的最后更新时间戳。对于虚拟对象,可能是内部状态发生变化的最后一次。

In practice, web pages are very often dynamically created from a Content Management System or otherwise, and in such cases, the Last-Modified header typically shows a data stamp of creating the response, which is normally very close to the time of the request. This means that the header is practically useless in such cases.

实际上,web页面通常是由内容管理系统或其他系统动态创建的,在这种情况下,最后修改的头通常显示创建响应的数据戳,这通常非常接近请求的时间。这意味着在这种情况下,header实际上是无用的。

Even in the case of a “static” page (the server simply picks up a file matching the request and sends it), the Last-Modified date stamp normally indicates just the last write access to the file on the server. This might relate to a time when the file was restored from a backup copy, or a time when the file was edited on the server without making any change to the content, or a time when it was uploaded onto the server, possibly replacing an older identical copy. In these cases, assuming that the time stamp is technically correct, it indicates a time after which the page has not been changed (but not necessarily the time of last change).

即使在“静态”页面的情况下(服务器只是获取与请求匹配的文件并将其发送),最后修改的日期戳通常只指示对服务器上的文件的最后一次写访问。这可能涉及到文件从备份副本中恢复的时间,或者是在服务器上编辑文件而没有对内容进行任何更改的时候,或者是将文件上载到服务器上的时间,可能会替换旧的相同副本。在这些情况下,假设时间戳在技术上是正确的,它表示页面未被更改(但不一定是最后更改的时间)的时间。

#2


44  

Open your browsers console(?) and enter the following:

打开浏览器控制台(?),输入以下内容:

javascript:alert(document.lastModified)

#3


4  

For checking the Last Modified header, you can use httpie (docs).

为了检查最后修改过的头,可以使用httpie (docs)。

Installation

pip install httpie --user

Usage

$ http -h https://martin-thoma.com/author/martin-thoma/ | grep 'Last-Modified\|Date'
Date: Fri, 06 Jan 2017 10:06:43 GMT
Last-Modified: Fri, 06 Jan 2017 07:42:34 GMT

The Date is important as this reports the server time, not your local time. Also, not every server sends Last-Modified (e.g. superuser seems not to do it).

日期很重要,因为它报告服务器时间,而不是本地时间。而且,并不是每个服务器都发送Last-Modified(例如,超级用户似乎不发送)。

#4


4  

There is another way to find the page update which could be useful for some occasions (if works:).

还有一种方法可以找到页面更新,这在某些情况下是有用的(如果有用的话)。

If the page has been indexed by Google, or by Wayback Machine you can try to find out what date(s) was(were) saved by them (these methods do not work for any page, and have some limitations, which are extensively investigated in this webmasters.stackexchange question's answers. But in many cases they can help you to find out the page update date(s):

如果该页面已被谷歌或Wayback机器索引,您可以尝试找出它们保存的日期(这些方法对任何页面都不起作用,并且有一些限制,这些限制在本网站管理员中被广泛研究。课件的问题的答案。但在许多情况下,它们可以帮助您查找页面更新日期:

  1. Google way: Go by link https://www.google.com.ua/search?q=site%3Awww.example.com&biw=1855&bih=916&source=lnt&tbs=cdr%3A1%2Ccd_min%3A1%2F1%2F2000%2Ccd_max%3A&tbm=
    • You can change text in search field by any page URL you want.
    • 您可以通过任何您想要的页面URL更改搜索字段中的文本。
    • For example, the current * question page search gives us as a result May 14, 2014 - which is the question creation date: 我如何找到网页最后更新的时间?
    • 例如,当前的*问题页面搜索结果是2014年5月14日,也就是问题创建日期:
  2. 方法:点击链接https://www.google.com.ua/search?例如,当前的*问题页面搜索结果是2014年5月14日,也就是问题创建日期:
  3. Wayback machine way: Go by link https://web.archive.org/web/*/www.example.com
    • for this * page wayback machine gives us more results: Saved 6 times between June 7, 2014 and November 23, 2016., and you can view all saved copies for each date
    • 这台*页面回传机提供了更多的结果:从2014年6月7日到2016年11月23日,保存了6次。,您可以查看每个日期的所有保存副本。
  4. 回程机方式:通过链接https://web.archive.org/web/*/www.example.com,这台*页面回程机提供了更多的结果:在2014年6月7日到2016年11月23日之间保存了6次。,您可以查看每个日期的所有保存副本。

#5


0  

I have written a blog about this, which shows some simple steps to check the date and time of your website last updated. https://sachinapatel.wordpress.com/ You can check it on the first blogpost

我写了一篇关于这个的博客,它展示了一些简单的步骤来检查你的网站最近更新的日期和时间。https://sachinapatel.wordpress.com/你可以在第一个博客上看到

#6


-1  

For me it was the

对我来说是

article:modified_time

in the page source.

在页面的来源。

我如何找到网页最后更新的时间?