Skip to content

Improve SPA caching#3879

Merged
turbobobbytraykov merged 5 commits intovnextfrom
pmoleri/improve-spa-caching
Feb 12, 2026
Merged

Improve SPA caching#3879
turbobobbytraykov merged 5 commits intovnextfrom
pmoleri/improve-spa-caching

Conversation

@pmoleri
Copy link

@pmoleri pmoleri commented Feb 2, 2026

Why:
SPA had a 1 year cache for all static files, including the index.html
image

This is terribly bad for updating the app because you get an older version of the app unless you force reload.
This can also lead to crashes, because the cached index.html will reference related scripts that are no longer there.

e.g.
image

How:

  • New rules:
    • index.html 5 min public cache
    • Hashed files 1 year immutable public cache
      • main-<hash>.js
      • chunk-<hash>.js
      • polyfills-<hash>.js
      • styles-<hash>.css
  • Other static assets 1 hour

e.g.
image

Additionally:

  • Enable SVG compression

This should apply to:

  • angular-demos/
  • angular-demos-grid-crm/
  • angular-demos-lob/

After testing this, the same approach should be applied to:

  • igniteui-angular-examples (angular-demos-dv/)
  • angular-grid-examples

@pmoleri pmoleri force-pushed the pmoleri/improve-spa-caching branch 3 times, most recently from 98ec293 to b21f89b Compare February 2, 2026 20:39
@pmoleri pmoleri force-pushed the pmoleri/improve-spa-caching branch from b21f89b to 2361ca7 Compare February 3, 2026 13:04
Copy link

@turbobobbytraykov turbobobbytraykov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, let's give it a go

@turbobobbytraykov turbobobbytraykov merged commit a6bb888 into vnext Feb 12, 2026
9 checks passed
@turbobobbytraykov turbobobbytraykov deleted the pmoleri/improve-spa-caching branch February 12, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants