• 0 Posts
  • 6 Comments
Joined 2 years ago
cake
Cake day: June 14th, 2023

help-circle





  • They have pretty different use cases. Localstorage is for when you want persistence across page loads, not necessarily specific to any particular page but specific to a browser. An example would be storing user-selected light or dark mode.

    Query parameters are specific to a page/URL and you get a lot of things for free when you use them:

    • back/forward navigation
    • bookmarking
    • copy-paste to share
    • page level caching
    • access on both server and client

    Query parameters are good for things like searches, filters, sorting, etc