Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #21046
| From | Swifty <steve.j.swift@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Passing parameter to external script |
| Date | 2013-08-24 17:27 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <kvamu0$l28$1@speranza.aioe.org> (permalink) |
| References | <kv9rtr$ccu$1@speranza.aioe.org> <0.dd222275a65ffd470b32.20130824125904BST.87vc2vl2pj.fsf@bsb.me.uk> |
On 24/08/2013 12:59, Ben Bacarisse wrote: > Do you know about the document.lastModified property? It could be > useful to you. I don't know how widely supported it is, but a quick > tests suggests it has better support than currentScript. > > I prefer to do all this sort of thing server-side, but that may not be > an option for you. I may be showing my ignorance here (see http://www.swiftys.org.uk/wiz?574) but my sample JavaScript uses document.Lastmodified and I have no recollection of encountering currentScript. However, when pressed on "do you know abut the document.lastModified property?" my answer would have to be "not much", as that was part of the original script that I cribbed (and have changed little). I know that it returns the date that the HTML was last changed, and that this information is passed from server to browser in the HTTP headers. The mechanism seems fully robust, and very widely supported. However, I can't imagine anyone getting sufficient worked up to contact me when the phrase "This page was last updated" is followed by nothing (the result when the JavaScript fails on: "DayOfWeek[(LastModifiedDate.getDay() + 1 )]" I would perhaps use server-side to detect the changed-date of my index.html file on the various webservers where I operate, but I suspect this would require PHP to be activated on the servers. My http://www.swiftys.org.uk/index.html comes from a server where PHP is not activated, and the SysAdmin of the site did me a huge favour when I requested certain features, so I try not to rock the boat by asking for more. It's a good idea to generate the "This document last changed [date]" in the CGI scripts, where possible, and I will enjoy implementing this change. I suspect my CGI scripts would not generate the necessary HTTP header for document.lastModified to work, anyway. -- Steve Swift http://www.swiftys.org.uk/
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Passing parameter to external script Swifty <steve.j.swift@gmail.com> - 2013-08-24 09:46 +0100
Re: Passing parameter to external script Swifty <steve.j.swift@gmail.com> - 2013-08-24 09:54 +0100
Re: Passing parameter to external script Martin Honnen <mahotrash@yahoo.de> - 2013-08-24 11:00 +0200
Re: Passing parameter to external script Swifty <steve.j.swift@gmail.com> - 2013-08-24 10:26 +0100
Re: Passing parameter to external script Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-08-24 12:59 +0100
Re: Passing parameter to external script Swifty <steve.j.swift@gmail.com> - 2013-08-24 17:27 +0100
Re: Passing parameter to external script Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-08-24 19:49 +0100
Re: Passing parameter to external script Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-08-25 23:45 +0100
Re: Passing parameter to external script Swifty <steve.j.swift@gmail.com> - 2013-08-27 20:46 +0100
Re: Passing parameter to external script Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-08-28 19:32 +0100
csiph-web