Sunday, 5th February 2012

How To Check ‘When Was A Web Page Last Updated?’

In case of a blog it is very easy do determine when was it last updated. You can check the date of the latest post (although some silly bloggers tend to change dates to give it the latest look if they don’t feel like updating the blog). But what about a website? Won’t you like to know when was a web page last updated?

All you have to do is copy and past the javascript code below in your address bar and it will show the date (in mm/dd/yyyy format) and time (in 24hrs format) as a pop up! Just copy paste the code below in your address bar once the site has loaded successfully.

javascript:alert(document.lastModified)

Like the google webmaster page was last updated on 18th June 2008!

[via Digital Quest]

Tags:

12 Responses to “How To Check ‘When Was A Web Page Last Updated?’”

  1. GTD Wannabe 6 August 2008 at 2:36 am #

    Even better, you can paste that code into a new bookmark – giving you one-click access to the modified date. Thanks for the tip!

    • greenpeace 28 June 2011 at 4:10 am #

      how to set it as a new bookmark? pls elaborate more……thanks!

  2. Rajesh 6 August 2008 at 10:44 am #

    comeon guys…let me clarify this to you…

    It is easy on blogs only if the blog author displays the last modified date. most blogs display only the posted date.Guess, that is what you too show.

    document.lastmodified will return the last modifed date only if the page that your browse sends that as part of its http header and that too only if they return it correctly.For eg: you try opening this post in different tabs after a gap of a few seconds.It will show, different lastmodified dates.This implies that wordpress returns a last modifed date that is not correct.it just returns the server datetime that you access the post and not necessarily the last modified datetime.

    this can atbest be true only for static pages and not for something dynamic like wordpress posts/pages.

  3. GTD Wannabe 6 August 2008 at 4:18 pm #

    The post is very clear that you can usually tell when a blog has been updated. This tip is useful for *other* web pages. Obviously, you haven’t bumped into any such static pages. I do, all the time, in my research. It’s nice to know how fresh the info is.

  4. Keith Dsouza 6 August 2008 at 9:43 pm #

    Nice trick, but like Rajesh said tihs will be possible if the last modified headers are set by the server

  5. Rahul 27 November 2008 at 8:56 pm #

    HI guys, I tried the above trick but its not working. It is showing the present date and time. Can anyone help me out please. I want to know when the website was last updated by the webmaster.

  6. coco 17 July 2010 at 10:22 pm #

    bloggers can change the date of the post whenever they like so your method by just looking at the date of the post does not work always.
    I may make a post on may 23 2010 and change the date to January 1 2002

  7. Adar 28 October 2010 at 6:51 am #

    This is a good example of when the script is useful: http://www.gene-quantification.de/platform.html

    It is a static webpage with information about an instrument useful to amplify DNA. By using the javascript:alert(document.lastModified) command it's possible for me to check how old the information is and guess if it is likely that new instruments have been made available since then.

  8. ete N 13 March 2011 at 7:39 pm #

    Think someone needs to look around a bit the code "javascript:alert(document.lastModified)" only gives the last time the page was refreshed not the date the page was last edited

  9. Mr Hung 17 April 2011 at 10:28 am #

    Do you know a website that allow us to type the address of web page to check the date of upload?

  10. David 29 June 2011 at 9:58 pm #

    I found that on many sites it only returns the present time and date. Someone said that it only shows the time the page was last refreshed, so for busy sites, that figures – so the code is pretty useless


Leave a Reply

Please fill the required box or you can’t comment at all. Please use kind words. Your e-mail address will not be published.

Gravatar is supported.

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>