Tagged articles
localStorage
31 articles · Page 1 of 1
This article examines the security, performance, capacity, and query limitations of localStorage, explains how IndexedDB addresses each issue with asynchronous APIs, larger storage, stronger security, and advanced indexing, and introduces helper libraries that simplify its use.
IndexedDBStorageWeb
0 likes · 5 min read

Storing JWT tokens in localStorage, once a common practice for front‑end authentication, now poses severe XSS risks; this article explains the vulnerabilities, compares HttpOnly cookies, BFF with cookies, and Service Worker‑based solutions, and recommends safer strategies for modern web applications.
BFFCSRFHttpOnly cookie
0 likes · 11 min read

This article examines the security risks, synchronous blocking, size limits, and query shortcomings of localStorage, then shows how IndexedDB’s asynchronous API, larger storage capacity, stronger security model, and advanced indexing make it the superior choice for modern web applications.
IndexedDBJavaScriptWeb Performance
0 likes · 6 min read

While localStorage has long been the default client‑side storage for web apps, its security risks, synchronous blocking, limited capacity, and lack of advanced querying make it unsuitable for modern applications, and IndexedDB emerges as a superior, asynchronous, high‑capacity, secure, and query‑rich alternative, especially when paired with helper libraries like idb, Dexie.js, and localForage.
IndexedDBJavaScriptStorage
0 likes · 5 min read

This article examines the security, performance, and capacity limitations of localStorage and explains how IndexedDB offers asynchronous operations, larger storage, stronger security, and advanced query capabilities, while also recommending helper libraries to simplify its use.
IndexedDBJavaScriptSecurity
0 likes · 5 min read

This article explains why synchronizing data across multiple same‑origin browser tabs is essential for a smooth user experience and compares three practical techniques—localStorage events, BroadcastChannel, and SharedWorker—detailing their mechanisms, advantages, and trade‑offs.
BroadcastChannelSharedWorkerWeb APIs
0 likes · 7 min read

Storing JWT tokens in localStorage, once a common practice for front‑end authentication, now poses severe XSS risks, prompting developers to adopt more secure methods such as HttpOnly cookies with SameSite protection, BFF‑backed session cookies, or Service Worker‑based token handling, each with trade‑offs.
BFFCSRFJWT
0 likes · 8 min read

Learn how to synchronize data across multiple browser tabs using the native BroadcastChannel API and the fallback localStorage + storage event, with step‑by‑step code examples, usage scenarios, feature comparisons, compatibility notes, and a reusable TabMessenger class for seamless inter‑tab messaging.
BroadcastChannelJavaScriptWeb API
0 likes · 9 min read

This article explains why naïvely parsing JSON from localStorage often crashes applications, and provides a concise safeJSON wrapper, versioned key strategy, and TypeScript guards to prevent runtime errors and ensure robust frontend data handling.
JSONJavaScriptTypeScript
0 likes · 4 min read

This article examines the security, performance, and capacity limitations of localStorage and explains how IndexedDB offers asynchronous operations, larger storage, stronger security, and advanced querying, supported by real‑world migration examples and helpful libraries.
IndexedDBWeb StoragelocalStorage
0 likes · 6 min read

This article explains the differences between localStorage and sessionStorage, demonstrates through code experiments that sessionStorage does not share data across multiple tabs unless the new page is opened via window.open or a link, and summarizes the resulting behavior.
JavaScriptWeb Storagebrowser API
0 likes · 4 min read

This article explains how to override the native localStorage and sessionStorage APIs in JavaScript, providing a flexible proxy layer that supports business‑specific logic, global monitoring, data protection, encryption, and configurable hooks, with practical Vue 3 integration examples.
JavaScriptStorageVue
0 likes · 12 min read

This article explains why the native storage event only works across different tabs, evaluates traditional polling and proxy approaches, and presents four efficient solutions—including custom StorageEvent, CustomEvent, MessageChannel, and BroadcastChannel—along with practical React and Vue examples for real‑time localStorage monitoring.
JavaScriptReactVue
0 likes · 12 min read

This article demonstrates how to create a multi‑window, real‑time interactive animation using pure JavaScript by drawing circles on a canvas, sharing each window's screen coordinates and colors through localStorage, and connecting them with lines across browsers.
CanvasJavaScriptcross-window
0 likes · 10 min read

This article explains how a pure‑frontend implementation using three.js and localStorage creates a synchronized 3D scene across multiple browser windows, detailing the project structure, core code files, and the window‑management logic that enables cross‑window coordination without a back‑end.
3DThree.jsWindow management
0 likes · 13 min read

This article provides a comprehensive overview of browser localStorage and sessionStorage, covering their differences, compatibility, API usage, storage limits, performance tips, and practical applications such as habit tracking, first‑open prompts, and reducing redundant API calls.
JavaScriptWeb Storagefrontend
0 likes · 15 min read


转转QAJul 31, 2023 · Frontend Development
This article explains the concepts, differences, browser compatibility, APIs, storage limits, performance considerations, and practical applications of localStorage and sessionStorage in web development, providing code examples and best‑practice guidelines for using browser storage effectively.
JavaScriptWeb Storagefrontend
0 likes · 15 min read

This article provides a comprehensive guide to client‑side caching, covering HTTP strong and conditional caching, cache‑control directives, and local storage options such as cookies, localStorage, sessionStorage, and IndexedDB, while offering practical strategies for cache refresh, browser cache principles, and offline application design.
IndexedDBWeb Performancebrowser caching
0 likes · 14 min read

This article explains the fundamentals and strategies of client‑side caching, covering HTTP cache mechanisms (strong and negotiated caching), cache‑control directives, cookie storage, localStorage, sessionStorage, and IndexedDB, and provides practical guidelines for optimizing web performance and reducing network load.
HTTPIndexedDBfrontend
0 likes · 15 min read

This article compares three browser storage options for JWT—Cookie, localStorage, and sessionStorage—examining how each works, their automatic handling, and security implications such as CSRF and XSS, ultimately recommending Cookies with proper SameSite and HttpOnly settings for stronger protection.
CSRFCookieJWT
0 likes · 4 min read

This article compares three browser storage options for JWT—Cookie, localStorage, and sessionStorage—examining their automatic transmission, CSRF and XSS vulnerabilities, and security configurations such as SameSite and HttpOnly to help developers choose the safest method.
CSRFCookieJWT
0 likes · 4 min read


21CTOAug 28, 2021 · Frontend Development
This article introduces a React‑powered project that recreates a simplified Windows 10 desktop experience in the browser, detailing its multi‑user support, persistent file system using LocalStorage and IndexedDB, core features, missing components, setup instructions, and the open‑source libraries it relies on.
Frontend DevelopmentIndexedDBReact
0 likes · 5 min read


21CTOJul 4, 2021 · Backend Development
This article explains the fundamentals of single sign‑on in web applications and compares three practical implementations—parent‑domain cookies, a dedicated authentication center, and a front‑end driven LocalStorage solution—detailing their mechanisms, advantages, and limitations.
CookieSSOlocalStorage
0 likes · 11 min read

This article explains how Single Sign‑On works in browser‑server applications, compares three implementation methods—parent‑domain cookies, a dedicated authentication center, and cross‑domain LocalStorage with iframe/postMessage—and provides sample code for the latter technique.
AuthenticationCookieSSO
0 likes · 10 min read

This article explains three practical SSO implementation methods—using a parent‑domain cookie, deploying an authentication center, and leveraging LocalStorage with iframe/postMessage—to share session IDs or tokens across multiple web applications, discussing their advantages, limitations, and code examples.
Authentication CenterCookieJavaScript
0 likes · 10 min read

This article explains the principles of Single Sign-On, compares three implementation methods—parent‑domain cookies, a dedicated authentication center, and cross‑domain LocalStorage with token sharing—and provides code examples and practical considerations for each approach.
CookieSSOlocalStorage
0 likes · 10 min read

This article explains three practical methods for achieving Single Sign‑On in web systems—using a parent‑domain cookie, deploying a dedicated authentication center, and leveraging front‑end LocalStorage with iframe postMessage—to share session or token information across multiple domains.
AuthenticationCookieSSO
0 likes · 11 min read


政采云技术Oct 20, 2019 · Frontend Development
This article explains how to use localStorage, sessionStorage, and the storage event to achieve reliable, side‑effect‑free data synchronization between same‑origin web pages, providing a practical implementation with JavaScript code and detailed design considerations.
JavaScriptcross-page communicationfrontend
0 likes · 12 min read


21CTOSep 16, 2017 · Frontend Development
This article explains how various web caching techniques—including browser, proxy, CDN, and storage APIs—work together through HTTP headers, expiration policies, and validation mechanisms to dramatically improve frontend load times and reduce bandwidth usage.
Browser CacheCDNCache Control
0 likes · 8 min read


21CTOApr 28, 2016 · Frontend Development
An in‑depth guide to the evolution of browser storage—covering cookies, Web Storage (localStorage/sessionStorage), IndexedDB, WebSQL, and related APIs—explains their concepts, usage, compatibility, and provides practical code examples for reading, writing, and managing data across modern browsers.
IndexedDBWebSQLbrowser storage
0 likes · 15 min read

This article provides a comprehensive overview of common browser storage technologies—including Cookies, Web Storage (localStorage and sessionStorage), IndexedDB, WebSQL, Application Cache, and Service Workers—explaining their purposes, compatibility, and offering practical code examples for each.
IndexedDBWebSQLbrowser storage
0 likes · 15 min read
