Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find when a web page was last updated

Tags:

html

upload

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

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

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

I have no access to server; just a link to the webpage.

like image 315
guisantogui Avatar asked May 14 '14 01:05

guisantogui


People also ask

How can you tell when a web page was last updated?

Start by opening the webpage in your browser. In the address bar, type the following, “javascript:alert(document. lastModified)” after the web page's URL. When you press enter, you will see a popup that displays the latest updated date.

How do you find out when a webpage was added?

Go to google.com and copy-paste the full URL of any web page in the search box and prefix it with the inurl: operator. Step 2. Now go your browser's address bar - press Ctrl+L on a Windows machine or Cmd+L on Mac - and append &as_qdr=y25 to the end of the Google search URL. Press enter again.


2 Answers

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.”

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.

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).

like image 180
Jukka K. Korpela Avatar answered Sep 21 '22 12:09

Jukka K. Korpela


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

javascript:alert(document.lastModified) 
like image 28
Vaux42 Avatar answered Sep 19 '22 12:09

Vaux42