Wordpress LScache Plugin: Manifest not caching
Last Updated on: Wed, 15 Apr 2026 00:00:02 On my WordPress site, Im using the PWA for WP plugin which generates a pwa-manifest.json file. When I run a test on my home page from the webpagetest.org web service, I get an error: No max-age or expires /pwa-manifest.json. All other files are well cached, but it looks like this one cannot be cached. Can you help me cache the manifest file? Thank you. Hi, you can try add something like ExpiresByType xxx/yyy A31557600 replace xxx/yyy to your json file MIME type but I am not sure if it good idea to add expire header over json file ? Best regards, Hi, Do you know the reason why your plugin doesnt cache the manifest file? because it only caches dynamic response from WordPress and your warning is about browser cache , and by default , I think nobody puts expire/cache-control header over json ? Is it possible to add a ExpiresByType directive for json files in the htaccess file like those added by activating the browser cache ? yes , i just state it in previous reply check your json file , looking for its MIME , then replace it into that xxx/yyy Thank you for your answer but it doesnt correspond to my question which I may have formulated incorrectly. Actually, I added the directive manually in my .htaccess file as you suggested in your previous post. But if I deactivate the browser cache from the back-office, its cleared (which is normal since I inserted it in the part reserved for the plugin). If I reactivate the browser cache, all the ExpiresByType directives are well rewritten in the .htaccess but not the one concerning the json files (which is normal since your plugin doesnt support it) and Ive to rewrite it manually. My question is therefore the following: is it possible to modify the plugin so that it adds the ExpiresByType directive for json files, as it does for images, text files etc ?? This would make it compatible with PWAs. Hi, You need to put it outside of LSCWP marker , because everything inside of LSCWP marker line , will be modified when you save setting in LSCWP Best regards, I prefer to keep the processing logic of the .htaccess file. While waiting for you to integrate perhaps one day expiry dates on files that you have omitted, in order to correctly pass the tests on WebPageTest.org, I have modified your htaccess.cls.php file and I will there added: ExpiresByType application / json A31557600 ExpiresByType application / xml A31557600 ExpiresByType text / xml A31557600 ExpiresByType application / rss + xml A31557600 ExpiresByType application / atom + xml A31557600 Best regards,
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference