Closed ram-you closed 2 years ago
Hi @ram-you.
The full warning provided by Lighthouse is the following :
There may be stored data affecting loading performance in this location: IndexedDB. Audit this page in an incognito window those resources from affecting your scores.
Lighthouse is giving you a hint that you should run Lightouse in incognito mode to ensure the performance test isn't affected by any already created resource for this website.
Here are some options you have :
Application -> Storage
and Clear site data
before running LighthouseHi @kevinmarrec , thanks for response. I know how to work around this problem, but I was wondering why store the cache in indexedDB and is there an option not to.
@ram-you
If something is stored in IndexedDB
, this is handled by Workbox.
I found some info here https://developers.google.com/web/ilt/pwa/live-data-in-the-service-worker
Then I inspected what was stored in IndexedDB
:
It sounds like IndexedDB
is used by the Workbox Expiration plugin, which is used by this module to add expiration on cached images :
See https://developer.chrome.com/docs/workbox/reference/workbox-expiration which indeed references IndexedDB
.
It doesn't seem to be possible to opt out IndexedDB
usage, as it's how the official Worbox Expiration plugin works.
@ram-you The only solution I can give you is the possibility to use your custom Workbox template and don't use expiration plugin, but I think it would be quite unreasonable to do this cause, after all, when you want to run a Lighthouse test you want to run it on a fresh website, without cookies, cache (IndexedDB included) and more. That's why I would just recommend you to always run your Lighthouse in incognito mode :)
Feel free to open a new issue if you want the custom template option as module enhancement.
Hi, how To Fix Lighthouse Indexeddb Warning :
"There may be stored data affecting loading performance in this location: IndexedDB"