1

I have an ajax call that reads a json file. When running on localhost the Last-Modified response header is populated with the file modified date.

When I run the same code and files on Azure the Last-Modified header is not returned at all. The only headers received are: Content-Encoding, Content-Type, Date, Request-Context, Transfer-Encoding, Vary.

How can I get the modified date from the ajax call? Below is the code I'm using to get the Last-Modified date.

lastModified=new Date(xhr.getResponseHeader('Last-Modified'));

Thanks.

Railton
  • 161
  • 4
  • 11
  • In the case of azure blob storage. However, with JSON file it does not send 'last modified' header. Maybe you could have some web API, where you could retrieve the JSON file and last modified time from blob storage and return it in response. Check these links:- https://stackoverflow.com/questions/36266792/getting-the-latest-file-modified-from-azure-blob https://stackoverflow.com/questions/34885801/download-blob-storage-and-return-json-object Use this web API in ajax script. – Sandeepkumar Gupta Aug 08 '19 at 10:07

0 Answers0