vendredi 24 janvier 2020

Browser not caching my request with Cache-Control header

I have this API written in PHP that returns a JSON and these are the headers:

header('ETag: "mytag"');
header('Cache-Control: public, max-age=31536000');

I request the API using XMLHttpRequest in JS. The problem is that no browser (Safari, Firefox, Chrome) is caching my API. I know that the browsers cache is working because it's caching other requests.




Aucun commentaire:

Enregistrer un commentaire