Results 1 to 5 of 5

Thread: Find the last modified time of file on webpage

  1. #1
    Join Date
    Apr 2012
    Location
    India.
    Posts
    88
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Find the last modified time of file on webpage

    Dear All,
    I would like to know if is there any way to find when file was last modified on the server (website).

    I am using QNetworkAccessManager class to download file from website but I also would like to know when it was last modified on the server.

    I am using Qt 5.3,

    Please help.

    Thanks,

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Find the last modified time of file on webpage

    QNetworkAccessManager::head(), QNetworkReply::header() and the "Last-Modified" header (QNetworkRequest::LastModifiedHeader). You may also see that header in the response to a get() call.

  3. #3
    Join Date
    Apr 2012
    Location
    India.
    Posts
    88
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Find the last modified time of file on webpage

    Thank you for the kind reply.
    I will check those options.

    Thanks,

  4. #4
    Join Date
    Apr 2012
    Location
    India.
    Posts
    88
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Find the last modified time of file on webpage

    I have tried QNetworkRequest::LastModifiedHeader but it doesn't seems working for me.

    I am downloading one zip file from web server using QNetworkAccessManager and I would like to know when this zip file was last created/modified on server.

    If anyone has any idea, please help.

    Thanks,

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Find the last modified time of file on webpage

    If the server doesn't provide such information (e.g. with the last modified header), you will not be able to retrieve it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 4
    Last Post: 13th August 2015, 11:06
  2. Replies: 9
    Last Post: 18th March 2014, 13:53
  3. Replies: 2
    Last Post: 16th July 2013, 08:16
  4. not able to find the button in a html webpage
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 0
    Last Post: 25th June 2013, 08:54
  5. how to find all images used by webpage
    By rbp in forum Qt Programming
    Replies: 0
    Last Post: 14th June 2010, 11:15

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.