• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 755
  • Last Modified:

Check to See When the Web Page Was Last Updated

With the URL that I want to check, I entered:

In Firefox, nothing came up.  In IE, the current date / time came up.  I tested this on a web page that I knew was updated a month ago, so I know this is not correct.

In Firefox, I went to Information - Page Information.  The date that was in the Modified was Sunday, August 26, 20.12 08:05:26.  Closing that box and hitting reload, the time was updated to the current time.

I don't know think that Google Analytics would matter - I checked a page that did not have this.  

The pages are .jsp and .asp - I don't know if that matters (since the page is be created at the time it is created on the server)?

Thank you!
  • 5
  • 5
3 Solutions
Are we talking classic asp?
If so the page is compiled at run time so the last modified will always be the current time.
One solution is to put the js in an include file or use asp to actually read the file date.
Erdinç Güngör ÇorbacıPHP Development Team LeaderCommented:
As told in here (http://www.bloggingdeveloper.com/post/How-To-Display-the-Last-Modified-Date-of-a-Document-using-Javascript-Javascripts-document-lastModified-Property.aspx)

In order for this property to work, the server has to send the information to the browser. which is widely supported by the browsers nowadays.

 When a server does not send a lastModified date information to the browser, Netscape and Opera give a last modification date of 01/01/1970 at 00:00:00 hrs, while Internet Explorer gives today. So it is always a good practice to test the server if it is sending the necessary information to the browser before using this script.

So either be sure your server sends this information or try to adapt a PHP/.NET aided solution which sends info from serverside
coreybryantAuthor Commented:
It is a .jsp that I am actually wanting to know when it was updated.  

I tried Opera and it also gave the current date. I guess their server is not sending the information.
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Erdinç Güngör ÇorbacıPHP Development Team LeaderCommented:
If your platform is java then  sending the -file last modified time- data from serverside to client side though GET (or something else)  is a better idea i think.
capture the modified time at serverside then append to url like

coreybryantAuthor Commented:
Ok, thanks.  Let me try that when I get home - if they have not updated the page.  But I did print it.

Any particular browser?
Erdinç Güngör ÇorbacıPHP Development Team LeaderCommented:
You can do the solution i told only to the sites you control. Serverside changes has to be done for this. So if you are planning learn last updated time for a remote site page you can't use serverside solution.
By the way why you need this , maybe we can find another way to get around that.
coreybryantAuthor Commented:
I tried in IE, but it did not work.  

If I don't control website, is there another way?
Erdinç Güngör ÇorbacıPHP Development Team LeaderCommented:
Thats more than a browser issue thats about server remote file hosted.

As i mentioned in my first comment server has to send you last modified time

if you can use PHP on your own server put these in a file and run there you will be sure if server sends that info or not.


$url = "http://us.php.net";
$curl = curl_init();

    curl_setopt($curl, CURLOPT_URL,$url);
    //don't fetch the actual page, you only want headers
    curl_setopt($curl, CURLOPT_NOBODY, true);
    curl_setopt($curl, CURLOPT_HEADER, true);
    //stop it from outputting stuff to stdout
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

    // attempt to retrieve the modification date
    curl_setopt($curl, CURLOPT_FILETIME, true);

    $result = curl_exec($curl);
    $info = curl_getinfo($curl);
    echo "<pre>";
    echo "</pre>";
	if ($info['filetime'] != -1) { //otherwise unknown
        echo date("Y-m-d H:i:s", $info['filetime']); //etc


Open in new window

if you are given you will see a date like this but this is also not so reliable because as you can see php.net refreshes that time because php is creating page on the php on every request.
coreybryantAuthor Commented:
I did some screen shots and had that put the time on there.  Plus I printed it with the time  /  date in footer.    

Basically, this company was telling me that my medical test was $2,775.00 or if I qualified, it would be $683.75.

However on their sites and what they tell the doctors is $500.00.  Their site states
This program limits patient cost to 20% or $500 (whichever amount is less) for any of Company tests.
The paperwork they sent me - they wanted $683.75.  

My results were supposed to have been received today to make sure I am on the correct treatment for Multifical Motor Neuropathy.  This has only been discovered in the past 20 years and before then, people were being diagnosed with ALS.  

I had already seen two neurologists that mis-diagnosed me and fortunately I had my own.  Within a week I  was dianosed and it takes some people three years for a proper diagnosis.  And with nerves only growing about 1 ml a day - it might take 75-90 days to get full recovery.

It was just frustrating because Quest boast of technology on their site everywhere, but a simple phone call, fax, could not be made.   I even tried to conference them together, but the company that Quest owns says they received the fax and it is being handled.

So it seems like this is just more server side.  But after my 12 page fax showing them hw easy it, the test is being processed
coreybryantAuthor Commented:
Thanks for the help / suggestions / support for Check to See When the Web Page Was Last Updated
Erdinç Güngör ÇorbacıPHP Development Team LeaderCommented:
Hmmm very disgusting procedures :(  .... I hope you get what you wish.
If you cannot try php solution you can send me the url of target site so that i can send you a result dump here.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now