I have a task. I have a server call to get list of images. Along with other information I have to add this information that weather it was loaded from cache or from server.
Is there a way that I can check the headers in the api call? If it is from cache I get status code 200 but I get extra information like this (from cache). If it is not from cache I only get status code 200.
Image 1 is for the those which is not loaded from cache
The next image is for those which are loaded from cache.
I have got that the answer has been already given or it is duplicate. I have tried that solution and it doesn't seem to work. Also it is chrome specific, I am looking for something more general that should work in all browsers. I hope this explains why I didn't went for that solution. I have searched it before asking here.
Looking forward for responses.