Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
113
rated 0 times [  115] [ 2]  / answers: 1 / hits: 39396  / 15 Years ago, mon, february 22, 2010, 12:00:00

I have a set of links on a web page that link to PDF forms and .doc forms. These files are not stored in a database, simply stored as they are, locally on the server. Is it possible to retrieve the last modified date of a PDF or DOC file using Javascript? I don't have any specific need to use Javascript, but it is preferable.



UPDATE: Now that I realize that Javascript can't access the filesystem, is there an alternative method?


More From » metadata

 Answers
28

Using the modern fetch method:


var lastMod = null;
fetch(xmlPath).then(r => {
lastMod = r.headers.get('Last-Modified');
return r.text();
})

[#97516] Wednesday, February 17, 2010, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
coby

Total Points: 27
Total Questions: 102
Total Answers: 97

Location: Honduras
Member since Wed, Jul 14, 2021
3 Years ago
coby questions
;