/    Sign up×
Community /Pin to ProfileBookmark

document.lastModified() returns current date

Web site in question: [url]www.spangdahlem.af.mil[/url]

There’s a javascript that I picked up from a freebie site that supposedly document.write()’s the date the document was last modified to the page. However, I’m not famililar with the document.lastModified function, and can only guess what it is doing. Anybody wanna take a look?

If it’s something simple, heh.. chalk it up to 7 AM in the morning ? The blue nav bars at the top of the page are includes files, if that makes a difference (which I don’t think it will.. but anyway..)

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisFeb 19.2003 — "document.lastModified" is not a function, it is a property obtained from the server. Some servers do not give you this information and instead return zero. Then some browsers (not NS 4) will see this and give you the current date instead.
Copy linkTweet thisAlerts:
@CharlesFeb 19.2003 — [font=georgia]And if you browse on over to http://www.delorie.com/web/headers.cgi?url=http%3A%2F%2Fwww.spangdahlem.af.mil%2F you will note that your server is not sending the last modified date in the HTTP header. You will also note that your server is a Microsoft product and that's what you get when you use Microsoft. Try to find a server that's running Apache. It's free, open source and way much better.[/font]
×

Success!

Help @Nicodemas spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...