Change caching headers from 'no-store'

We are currently setting the cache-control Header to private, no-storewhich makes it impossible that browsers use in-memory caching at least for the current session. Which reduces performance greatly when using browser controls like back or forward and on top of that prevents us from future performance improvements. With dynamic preloading we can already preload pages, first tests have shown that initial load/interaction time for an MR page goes from 1.23s to 10ms!

Kapture_2021-12-01_at_10.28.30

Competition

Public pages cache-control: no-cache Private pages max-age=0, private, must-revalidate

Current situation

We use always cache-control: private, no-store doesn't matter if public pages or private.

Change introduced in 782badd0 which also doesn't set cache headers by page content but rather if a user is logged in or not.

Changes

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

Drop no-store from all cache headers

The only exception to that is no-store directives which the memory cache does respect in certain situations (for example, when the resource is reused by a separate node).

https://calendar.perfplanet.com/2016/a-tale-of-four-caches/

In my perspective we would have the same level of security by using private in our caching headers which would limit caching to local and the current browsing sesion

Set different headers based on public or protected pages

This would greatly improve the overall performance experience as browsing controls (forward + back) work better and at the same time allows us to do preloading.

Public pages no-cache

Private pages max-age=0, private, must-revalidate

Edited Dec 01, 2021 by Tim Zallmann
Assignee Loading
Time tracking Loading