Comments (5)
That's an interesting idea. I didn't know window.name
worked like that. Can you help me by answering some questions?
- When
window.name
is lost?- What about the different ways to refresh the page: using the address bar, using Reload Page, using Force Reload Page?
- Is the behavior of
window.name
consistent between browsers? - Do you know some libraries that use
window.name
for persisting data? - Is it secure? Do iframes have access to the value?
from use-local-storage-state.
https://developer.mozilla.org/en-US/docs/Web/API/Window/name
Wouldn't recommend it 😄
from use-local-storage-state.
@kolben I read the article. Thanks.
Why you wouldn't recommend it? What are the reasons? Thanks.
from use-local-storage-state.
- The original article linked is 13 years old.
- The frameworks referenced in the mdn article are long gone and the article clearly says it shouldn't be used to store user data
- window.name will very soon no longer be available across tabs/ windows
from use-local-storage-state.
@kolben Yep. That's pretty definitive. Closing this issue then. Thanks!
from use-local-storage-state.
Related Issues (20)
- Additional type exports HOT 4
- Async storage lookup/default value issue HOT 20
- Setter in useEffect dependencies array always changes HOT 5
- Does not respond to changes to localStorage made elsewhere in the application HOT 2
- Persist in localStorage, but do not upgrade React state HOT 5
- React 18 support (created by library author) HOT 8
- I have a problem using the use-local-storage-state HOT 7
- Hydration error with ssr:true using NextJS HOT 7
- need guidance for using sessionStorage also HOT 3
- Return isPossiblyHydrating HOT 4
- Usage Example contains "ssr: true", which does not appear to be a valid option HOT 1
- usage with reducer HOT 2
- Seems to be trying to fetch from local storage before window is defined in React/Next SSR environment HOT 6
- React 18: value only is available on 2nd render cycle HOT 13
- Latest version on npm is 17.3.0, rather than 18.2.0 HOT 3
- Could not find a declaration file for module 'use-local-storage-state'. HOT 4
- ✨ Make package ESM only
- block all cookies in safari breaks the hook HOT 9
- Next.js build error: targets must start with "./" HOT 2
- Migrating from `createLocalStorageStateHook` HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from use-local-storage-state.