473,581 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

last modified date of a web page?

Hello, Does anyone know how (or if) I can figure out the last time a
web page was last modified if my only access to it is via HTTP (a web
browser). Right now, I'm looking at "Page Info" options. There is a
"Modified" field but I think that is telling me the time that the file
was downloaded to my machine.

Any advice is greatly appreciated, - Dave

Jul 23 '05 #1
7 41057
Once upon a time *l************@ zipmail.com* wrote:
Hello, Does anyone know how (or if) I can figure out the last time a
web page was last modified if my only access to it is via HTTP (a web
browser). Right now, I'm looking at "Page Info" options. There is a
"Modified" field but I think that is telling me the time that the file
was downloaded to my machine.

Any advice is greatly appreciated, - Dave


Depends on the browser I'll guess, what date you see via HTTP. With IE
you see the "today" date when you downloaded the page. With Mozilla I
see the "modified" date in Page Info options, not the date when I
download it.

--
/Arne
http://hem.bredband.net/b450204/
Proud User of Mozilla Suite. Get your free copy here:
*English* http://www.mozilla.org/products/mozilla1.x/
Jul 23 '05 #2
la***********@z ipmail.com wrote:
Hello, Does anyone know how (or if) I can figure out the last time a
web page was last modified if my only access to it is via HTTP (a web
browser).


The server can (optionally) send a Last-Modified HTTP header. Failing that,
there isn't really anything you can do (save for polling it at intervals
and recording the time when it changes)

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #3
In article <11************ **********@z14g 2000cwz.googleg roups.com>,
la***********@z ipmail.com wrote:
Hello, Does anyone know how (or if) I can figure out the last time a
web page was last modified if my only access to it is via HTTP (a web
browser). Right now, I'm looking at "Page Info" options. There is a
"Modified" field but I think that is telling me the time that the file
was downloaded to my machine.

Any advice is greatly appreciated, - Dave


Well, given that html isn't a programming languages, how would you do
this on your browser? Javascript? Don't know how that would work.
What do you want to do with this information once you have it anyway?
HTML isn't capable of storing anywhere. You need a programming language
for that.

The most common way to do this is with a programming language like perl
or php as these run on the server where the file is stored. Or you can
simply insert a "server-side include" directive to display the modified
date of the page, if your server supports this. This, of course,
depends on your server. If your ISP doesn't support server side
includes or CGI or php, you're out of luck.

--
DeeDee, don't press that button! DeeDee! NO! Dee...

Jul 23 '05 #4
"" wrote in comp.infosystem s.www.authoring.html:
Hello, Does anyone know how (or if) I can figure out the last time a
web page was last modified if my only access to it is via HTTP (a web
browser). Right now, I'm looking at "Page Info" options. There is a
"Modified" field but I think that is telling me the time that the file
was downloaded to my machine.


More likely the page is created on the fly by the server.

--

Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
Jul 23 '05 #5
la***********@z ipmail.com wrote:

Hello, Does anyone know how (or if) I can figure out the last time a
web page was last modified if my only access to it is via HTTP (a web
browser). Right now, I'm looking at "Page Info" options. There is a
"Modified" field but I think that is telling me the time that the file
was downloaded to my machine.

Any advice is greatly appreciated, - Dave


The "Modified" date in "Page Info" is indeed when the page was last
changed. However, if the page involves a server-side include
(e.g., for a counter), the server modifies the page as it sends it
to your browser. In this case, the "Modified" date is the same as
the download date.

The only way to see the true date when the HTML file was last
changed on the server is to examine its directory. You would then
see something like this:

Index of /~rossde/cgi-bin
Name Last modified Size Description
[DIR] Parent Directory 08-Mar-2005 08:31 -
[TXT] Arch_Script.ksh 30-Oct-2003 21:55 1k
[TXT] Rest_Script.ksh 03-Oct-2003 19:14 1k
[TXT] back.tidx 26-Sep-2004 12:20 1k
[TXT] cnt_Canada_trip .dat 08-Mar-2005 10:43 1k

However, for security, most servers allow only the owner of the
directory to see this unless the owner grants permission to other
users. I tried to view my own public_html directory, but I was not
successful. I can view it via either FTP or TELNET, but my ISP
does not allow that via my browser.

--

David E. Ross
<URL:http://www.rossde.com/>

I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <URL:http://www.mozilla.org/>.
Jul 23 '05 #6
la***********@z ipmail.com wrote:
Hello, Does anyone know how (or if) I can figure out the last time a
web page was last modified if my only access to it is via HTTP (a web browser). Right now, I'm looking at "Page Info" options. There is a
"Modified" field but I think that is telling me the time that the file was downloaded to my machine.

Any advice is greatly appreciated, - Dave


If you have PHP enabled on your web server you can do something like
this:

HTML:
<html>
<head>
<title>Modified </title>
</head>
<body>
<!-- may be wrapped, please unwrap to make single line -->
This page was last modified: <script language="JavaS cript"
src="modified.p hp"></script>
</body>
</html>

php code:

<?php
//
// gets the server timezone, can be changes to the timeszone you want
// like this:
// putenv("TZ=Amer ica/Los_Angeles");
//
putenv(getenv(' TZ'));
//
// change to your file name
//
$filename = "modified.html" ;
//
// return javascript document.write command
// (may be wrapped, please unwrap to make single line)
echo "document.write ('".date( "F d, Y. H:i:s a", filemtime
($filename))."' );";
?>

Jul 23 '05 #7
MrBaseball34 wrote:

la***********@z ipmail.com wrote:
Hello, Does anyone know how (or if) I can figure out the last time a
web page was last modified if my only access to it is via HTTP (a

web
browser). Right now, I'm looking at "Page Info" options. There is a
"Modified" field but I think that is telling me the time that the

file
was downloaded to my machine.

Any advice is greatly appreciated, - Dave


If you have PHP enabled on your web server you can do something like
this:

HTML:
<html>
<head>
<title>Modified </title>
</head>
<body>
<!-- may be wrapped, please unwrap to make single line -->
This page was last modified: <script language="JavaS cript"
src="modified.p hp"></script>
</body>
</html>

php code:

<?php
//
// gets the server timezone, can be changes to the timeszone you want
// like this:
// putenv("TZ=Amer ica/Los_Angeles");
//
putenv(getenv(' TZ'));
//
// change to your file name
//
$filename = "modified.html" ;
//
// return javascript document.write command
// (may be wrapped, please unwrap to make single line)
echo "document.write ('".date( "F d, Y. H:i:s a", filemtime
($filename))."' );";
?>


Since my Web server is Apache with server-side includes enabled, I
do that all with the following at the point where I want to see the
date:
<!--#config timefmt="%e %B %Y" -->
<!--#echo var="LAST_MODIF IED" -->
I usually make a single line of the two commented statements, but
they still have to be two distinct comments. No script is
required.

Note, this displays in [day month year] format with the month
spelled out and a four-digit year. Use <!--#config timefmt="%B %e,
%Y" --> for [month day, year] format.

--

David E. Ross
<URL:http://www.rossde.com/>

I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <URL:http://www.mozilla.org/>.
Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1082
by: Shawn McKenzie | last post by:
Can someone help me with a query to get the date/time that a database was last modified? I looked at the SHOW command but there was no mention of this. TIA, Shawn
1
3226
by: Amanda | last post by:
Hi, hope you can help me with this one. If I want to get the date a page has been last modified, I can do something like .. document.write("<b>Last updated: "+document.lastModified+"</b>"); Can I use this to display the date that other pages were last modified - eg other pages on my website? I want my index.htm to display the last...
11
3622
by: Dennis Marks | last post by:
There seems to be a major program with the automatic display of the last modified date. Using the javascript "document.lastModified" sometimes returns the correct date and sometimes 1 Jan 1970 depending the the browser. Using SSI LAST_MODIFIED can return the last modified date, ISP system boot date, or many others. The only last modified...
5
2524
by: Steel | last post by:
Hi at all it is the first time that I use PHP and I need only to modify the last modified date of a file I maked a FIRST little script like this: $FileName="myfile.txt"; $Today =strtotime('2006-01-20 00:00:00'); touch($FileName,$Today)
6
3957
by: SQLcat | last post by:
I have a VBScript as follows: Dim xmlHTTP : Set xmlHTTP = CreateObject("Microsoft.XMLHTTP") Dim adoStream : Set adoStream = CreateObject("adodb.stream") Const bGetAsAsync = False ' wait for response Const adTypeBinary = 1 ' ado typelib constants Const adModeReadWrite = 3 Const adSaveCreateOverwrite = 2 Const ForReading = 1, ForWriting =...
3
7165
by: RAMohrmann | last post by:
Greetings, I am attempting to view all files in a directory and if those files have not been modified within the last couple days I will remove them. In order to do this I need to look at the file date modied and check the date. I know how to look at each file name and I know how to remove the file. I just can't figure out how to get access...
3
1864
by: Rarpy | last post by:
Hi all, I tried putting this at the beginning of a PHP file: <?php echo "Last-modified: " . date( "F d Y.", getlastmod() ); print ""; ?> The goal was to ensure that the browser would realize
1
2173
by: Svetac | last post by:
Hi, I use a script that shows when the page was last modified. It works fine for just one html file. The thing I would like to do is that the script shows me of last modified file in root directory. For example if I change something in gallery.html or feed.xml, I would like to see that date of change in index.html under last modified date....
3
3336
by: Gretsch | last post by:
Web, html, javascript, Hi, I need to calculate the time since this .htm file was last modified. {which I can then use in a calculation, rather than display, so days&decimals format would be OK} I can get the time NOW, but I am having trouble understanding the format/content of the document.lastModified field. Any help would be much...
0
7862
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7789
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7894
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6551
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5670
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5361
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3820
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1132
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.