Google Answers Logo
View Question
 
Q: JavaScript for Last Update when document.lastRevision won't work ( No Answer,   0 Comments )
Question  
Subject: JavaScript for Last Update when document.lastRevision won't work
Category: Computers > Internet
Asked by: etpro-ga
List Price: $25.00
Posted: 02 Jan 2005 19:58 PST
Expires: 18 Jan 2005 18:27 PST
Question ID: 450698
I was using the classic document.lastRevision script on Yahoo Stores
I'm responsible for. It worked great till a recent server change.
Yahoo switched to Apache servers and also went to compressed and
uncompressed chunking. The result is a comment line you'll see at the
bottom of any Yahoo Store page.

That line reads like: <!-- html111.store.sc5.yahoo.com
uncompressed/chunked Sun Jan 2 16:23:27 PST 2005 -->. You can review
the discussion at
http://www.ystoretools.com/forums/topic.asp?TOPIC_ID=25485&SearchTerms=,chunked

Chunking seems to be intefering with is the accuracy of the Apache
server's HTTP header's Last-Modified field. I use a JavaScript on many
Yahoo Stores to show the last modified date for each page on the
store. It works by reading that date from the http header sent to the
browser by the server, and using the document.write method to display
that date in the HTML page. But since chunking started, the date is
being reset every day to that day's date.

It does not appear to be possible to fix this using RTML, as I can't
find any way to access a variable that would timestamp the publish
operation from within RTML.

BTW, this is a Yahoo specific problem, although the odds of getting
them to admit it are infintesimally small. I use the same JS on
numerous Apache servers outside the Yahoo realm, and it works just
fine on all of them.

If anyone wonders, here's the script:

	<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
	<!-- Hide from old browsers
	var m = "Last revision: " + document.lastModified;
	var p = m.length-8;
	document.write(m.substring(p, 0));
	// End --> </SCRIPT>

Clarification of Question by etpro-ga on 02 Jan 2005 22:29 PST
What I am lookling for here is a way to supply an accurate last update
date. Open to JavaScript of RTML solutions. It just has to work
without using the last-modified field of the HTTP header.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy