How to Know When a Web Page was Last Modified?

Dennis Faas's picture

Infopackets Reader 'Dave' writes:

" Dear Dennis,

I have a question which I can't seem to find a clear-cut answer to. Can you tell me: is it possible to view a web site / web page and determine when it was last updated? "

My Response:

The simple answer is that there is no easy way to know when a page was last updated - which is most likely why you're having trouble finding the answer.

Information regarding the 'last modified date' of a page is usually reserved for web site owners (via direct access to the web site files / database with their associated time stamps). However, there are ways to get an approximation of a page's last modified date, even if you're not the web site owner. I'll discuss a few methods below.

View The Last Modified Date Using a Web Browser Plugin or Add-on

There are browser plugins available that will provide a web page's last modified date, but this method doesn't always work. It's done by analyzing web server headers "last-modified" command, but not all web servers will output this information when you visit a page. At the time of writing, many browser plugins that I've researched (at least, for Firefox) that use this method appear to be broken - most likely for the reasons I just mentioned. Anyone is welcome to chime in with a plugin they're using - if it is reliable.

Using RSS Feeds to check Published Dates of Articles

If a website offers an RSS feed (as many modern websites do), the published date is contained within the XML file. Most sites have an index.xml containing such information; you would need to view the file manually in your web browser to determine the dates. Example:

http://www.infopackets.com/index.xml

Using Google Cache to Check the Last Crawl of a Page

Google's Cache is a great way to look at a web page when it was last crawled by Google. You can access the Google Cache at any time; however, there is no way specify a date range of the cache, nor is there any way to know when the page was last crawled. In other words, it's a craps shoot as to the date and time of the page in Google's Cache. To check Google's Cache, you would enter the following into your web browser:

http://webcache.googleusercontent.com/search?q=cache:http://www.infopackets.com

Note that you would need to replace 'http://www.infopackets.com' at the end of the query with the website / web page you're researching.

Using 'The Way Back Machine' to Look at Websites in the Past

You could also try web archives via 'The Way Back Machine'. This is similar to Google's Cache, but provides you with an interface to specify crawl dates. Note that you cannot specify a user-defined date for a web page - only those which were crawled on specific dates by the Way Back Machine's web crawler.

http://archive.org/web/

For Web Owners: Specify Last Modify Date on Page

If you own a website, it's possible to output the last modified date of a web page. There are various ways to do this, depending on what platform you're running. For example: if you run Apache web server and you serve static files with Server Side Includes (SSI), you can output the last modified date of a static HTML page using the LAST_MODIFIED variable.

I hope that helps to answer your question.

About the author: Dennis Faas is the owner and operator of Infopackets.com. With over 30 years of computing experience, Dennis' areas of expertise are a broad range and include PC hardware, Microsoft Windows, Linux, network administration, and virtualization. Dennis holds a Bachelors degree in Computer Science (1999) and has authored 6 books on the topics of MS Windows and PC Security. If you like the advice you received on this page, please up-vote / Like this page and share it with friends. For technical support inquiries, Dennis can be reached via Live chat online this site using the Zopim Chat service (currently located at the bottom left of the screen); optionally, you can contact Dennis through the website contact form.

Rate this article: 
Average: 3.6 (13 votes)

Comments

Stuart Berg's picture

I created a bookmark in Firefox but, instead of the URL, I created the bookmark with the following Javascript:

javascript:alert(document.lastModified)

So when I use the bookmark while on a webpage, it "sometimes" gives me the last modified date. This works with static web pages, not dynamic webpages that change on the fly. For dynamic webpages I just get the current date and time.