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,
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.
Re: Find the last modified time of file on webpage
Thank you for the kind reply.
I will check those options.
Thanks,
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,
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.