Results 1 to 12 of 12
Thread: cool Javascript
-
08-27-2006, 06:34 PM #1Disabled
- Join Date
- Aug 2006
- Posts
- 10
cool Javascript
cool Javascript that can tell u the last modied time of a page .htm page on anyones site
cut and paste this code into the url when u are a .htm page
javascript:alert(document.lastModified)
or bookmark that code or make it a link on the tool bar or something
-
08-28-2006, 12:13 AM #2Newbie
- Join Date
- Aug 2006
- Posts
- 9
interesting. thanks
-
09-22-2006, 07:40 AM #3Newbie
- Join Date
- Sep 2006
- Posts
- 10
That isn't a bad script. But it doesn't seem very complicated
-
12-06-2006, 12:08 AM #4New Member
- Join Date
- Dec 2006
- Location
- Halifax, NS, Canada
- Posts
- 4
Originally Posted by Ranky
K.I.S.S.
-
12-08-2006, 08:24 PM #5Newbie
- Join Date
- Dec 2006
- Posts
- 13
I just keep getting the 'current' date/time... How do I use this again??
-
12-12-2006, 08:15 AM #6Junior Guru Wannabe
- Join Date
- Mar 2006
- Location
- tikkabilla
- Posts
- 51
Originally Posted by adpyramidhttp://parked.net -100% Google Adsense Revenue | http://viphotels.co.uk - Worldwide VIP Hotels
-
12-14-2006, 09:17 PM #7Living the dream
- Join Date
- May 2005
- Location
- Planet Earth
- Posts
- 813
This is not what I call a cool javascript..
try :
document.write("Cool Javascript");
this is one
G█ PutFile.io — Disrupting traditional file hosting.
█ Signup Early and enjoy Unlimited space/bandwidth for your files hosting, Forever!
█ No Ads.
█ No Countdowns.
-
09-07-2011, 06:48 PM #8Newbie
- Join Date
- Aug 2011
- Posts
- 19
If you put javascript:alert(document.lastModified) on a page or even on a old page it will return todays date. Because you are modifing by putting that in there???
SlepeHost provides excellent hosting at excellent prices.
We are dedicated to providing top quality hosting to a UK and Global market.
http://www.slepehost.co.uk/
For any information please contact support@slepehost.co.uk.
-
09-07-2011, 07:00 PM #9Web Hosting Master
- Join Date
- Nov 2010
- Posts
- 620
With JavaScript, which is client-side in this case, you can't detect something server-side without having the server send that information. It will only show the last modified date if it was sent as a Last-Modified header by the server. If the header isn't sent, it wil show the current client's date and time.
Very old topic by the way.
-
09-03-2013, 10:42 PM #10Newbie
- Join Date
- Aug 2013
- Posts
- 15
then can anyone suggest something else
a new JS code or in php
-
09-19-2013, 01:07 AM #11New Member
- Join Date
- Apr 2012
- Posts
- 3
It isn't possible from a client's perspective. What happens when you paste this into your address bar is your browser is making an alert with the date and time that the header said the page was last edited on. With PHP, the underlying HTTP server will instead send the current date and time because the page is dynamically being created.
If you go to a static page which is hosted on a web server that sends the last modified date & time in the header, then you will get the correct time it was last modified.
For example, go to https://projects.csail.mit.edu/area2/public/ and try it out- it will work fine.
-
11-24-2013, 09:13 AM #12Newbie
- Join Date
- Oct 2013
- Posts
- 16
Great - exactly what I've been looking for!