Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1.19 KB

File metadata and controls

25 lines (16 loc) · 1.19 KB

13_client-cookie-counter

../13_client-cookie-counter

This counter uses a cookie counter=1 to persist through pages relaod despite being a client counter.

For Astro SSR there is a simplicity advantage for using a cookie over using client sotrage :

  • Automatically sent with every client request
  • No display flicker
  • no need to create a server endpoint to submit the client updated value (to avoid the flicker)

Note : Only a single counter is used in this example given that a single cookie is used

Note : For a demo using cookies, the Astro.cookies could only be read in Gitpod

open in Gitpod

references