I've been trying to optimize my webpage using lighthouse report.
one of the performance diagnostics says to increase caching lifetime for my static files.
The files indicated in report are main.js, polyfills.js, runtime.js and styles.css. from what I understand these are main blocks of my webpage. I was thinking to increase cache using angular service worker. But I couldn't find any way to do so.
The closest thing I found to increasing cache time is angular service worker data groups. Datagroups supports cache config.
cacheConfig: {
maxSize: number;
maxAge: string;
timeout?: string;
strategy?: 'freshness' | 'performance';
};
but I couldn't figure out how to do same for AssetGroups. As I understand the js and css files belong to AssetGroups.
Here is the lighthouse report screenshot.
my webpage that I'm working is margvel.com I have the code on github.
I am also using firebase for hosting. Do I have, or can I change the caching policy on firebase?
How do I increase the cache lifetime on these files?
