Skip to main content
The 2024 Developer Survey results are live! See the results
added 913 characters in body
Source Link
harrymc
  • 1
  • 31
  • 580
  • 995

See Time-Stamping Usage.

Basically, if the web-server returns a Last-Modified header for wget, then to set the local last-modified time to the origin's date-time, use:

wget -S URL

This will work for both HTTP(S) and FTP.


As far as Firefox is concerned, this was discussed since 20 years ago and during many years in the post save original last-modified date on file downloads.

Finally, this was rejected and the following workaround was proposed:

This combination is the last one that will preserve the last-modified time.


As regarding Chrome, this was also discussed in the long-running post Issue 4574: Feature request: preserve timestamps on downloaded files, but nothing ever came out of it.

Conclusion : Seems like wget is the only one, the browsers won't do it, by design.

See Time-Stamping Usage.

Basically, if the web-server returns a Last-Modified header for wget, then to set the local last-modified time to the origin's date-time, use:

wget -S URL

This will work for both HTTP(S) and FTP.

See Time-Stamping Usage.

Basically, if the web-server returns a Last-Modified header for wget, then to set the local last-modified time to the origin's date-time, use:

wget -S URL

This will work for both HTTP(S) and FTP.


As far as Firefox is concerned, this was discussed since 20 years ago and during many years in the post save original last-modified date on file downloads.

Finally, this was rejected and the following workaround was proposed:

This combination is the last one that will preserve the last-modified time.


As regarding Chrome, this was also discussed in the long-running post Issue 4574: Feature request: preserve timestamps on downloaded files, but nothing ever came out of it.

Conclusion : Seems like wget is the only one, the browsers won't do it, by design.

Source Link
harrymc
  • 1
  • 31
  • 580
  • 995

See Time-Stamping Usage.

Basically, if the web-server returns a Last-Modified header for wget, then to set the local last-modified time to the origin's date-time, use:

wget -S URL

This will work for both HTTP(S) and FTP.