Skip to content

Performance: back/forward cache disabled with an open IndexedDB connection in Chromium #996

Open
@naveedahmed1

Description

@naveedahmed1

Checks before posting an issue

Configuration

  • @ngx-pwa/local-storage version:
  • Angular version (ng version):
"@ngx-pwa/local-storage": "15.0.0",

"@angular/core": "16.0.0-next.7",

Description of the issue

As described in https://web.dev/bfcache, the browsers' back/forward cache doesn't work when IndexedDB has an open connection. It seems that in current implementation the connections are opened but they're never closed. Here when running a Lighthouse audit for an Angular app, there's an error

Page prevented back/forward cache restoration 1 failure reason
Many navigations are performed by going back to a previous page, or forwards again. The back/forward cache (bfcache) can speed up these return navigations. [Learn more about the bfcache](https://developer.chrome.com/docs/lighthouse/performance/bf-cache/?utm_source=lighthouse&utm_medium=devtools)

The documentation of back/forward cache: https://developer.chrome.com/docs/lighthouse/performance/bf-cache/

How to reproduce the issue

Running a Lighthouse audit for an Angular app using latest version (I am testing it on Version 112.0.5615.87 (Official Build) (64-bit)) of Chrome, should throw this error.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions