Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 44629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:40:55+00:00 2026-05-10T15:40:55+00:00

How to get a file’s creation date or file size, for example this Hello.jpg

  • 0

How to get a file’s creation date or file size, for example this Hello.jpg at http://www.mywebsite.com/now/Hello.jpg(note: This URL does not exist)? The purpose of this question is to make my application re-download the files from the any website when it has detected that the website has an updated version of the files and the files in my local folder are out of date. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:40:56+00:00Added an answer on May 10, 2026 at 3:40 pm

    If you use the HEAD request it will send the headers for the resource, there you can check the cache control headers which will tell you if the resource has been modified, last modification time, size (content-length) and date.

    $ telnet www.google.com 80 Trying 216.239.59.103... Connected to www.l.google.com. Escape character is '^]'. HEAD /intl/en_ALL/images/logo.gif HTTP/1.0  HTTP/1.0 200 OK Content-Type: image/gif Last-Modified: Wed, 07 Jun 2006 19:38:24 GMT Expires: Sun, 17 Jan 2038 19:14:07 GMT Cache-Control: public Date: Tue, 16 Sep 2008 09:45:42 GMT Server: gws Content-Length: 8558 Connection: Close  Connection closed by foreign host. 

    Note that you’ll probably have to decorate this basic and easy approach with many heuristics depending on the craziness of each webserver’s admin, as each can send whatever headers they like. If they do not provide caching headers (Last-Modified, Expires, Cache-Control) nor Content-Length nor etag, you’d be stuck with redownloading it to test.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

To get the file size for every file in a list of files, I'm
How to get file size of pdf,gif,doc etc using xcode. suppose to i get
You can use command lsof to get file descriptors for all running processes, but
I am running Ubuntu8.041. Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch configured Can't get file uploading
I need to get the File version information from an exe file originally written
How to get the File Directory of a file (C:\myfolder\subfoler\mydoc.pdf). I also want to
I need to get a file from sourcesafe database programmatically. Any idea of how
I'm trying to get a file with ant, using the get property. I'm running
I'm trying to get file contents, replace some parts of it using regular expressions
I've read Get File Icon used by Shell and the other similar posts -

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.