There is often a need to use a webpage as a reference. So how is it possible to get the most recent date that webpage was updated?
There have been people suggesting that one might exploit the power of google and execute a specific kind of search that might reveal the date of a webpage. Like using the “inurl” trick
google.com/search?q=inurl:<webpage>
To my understanding, this trick is either outdated, or does not apply in all cases, as unfortunately in my case.
I found out that there is another trick that actually works. This includes a bit of JavaScript magic and access to the DOM, specifically the lastModified property of the document. The trick goes like this:
- Normally open the webpage on a browser
- Go to the address bar and type in the following javascript command and hit enter
javascript:alert(document.lastModified)
It is expected that the browser will respond with an alert box presenting the exact latest update date and time for this webpage.
*** Although Chrome and Firefox checked ok, currently there is an issue with Safari which refuses to execute a JavaScript command from the address bar (nowadays called the “smart search field”).
Apparently there is a workaround: Enable “Allow JavaScript on Smart Search Field” in the “Develop” menu of Safari (this menu is activated from Safari Preferences > Advanced)