Mohammed-Maghri / Rank

Student Rank-Board Website For 1337 Coding School (In Progress) www.1337leets.com
https://1337leets.com
1 stars 1 forks source link

Suggestion: Replace LocalStorage with SessionStorage for Better Session Management #2

Open achrafOuk opened 1 month ago

achrafOuk commented 1 month ago

Hey there, 👋

First of all, thank you for your work on this project! It's been great using the app, and I really appreciate the effort you've put into creating a seamless user experience.

I noticed that you delete the data from LocalStorage each time the user visits your website, and while this is fine, you might be using LocalStorage incorrectly. You should use SessionStorage instead because it better fits your needs. SessionStorage automatically manages the lifecycle of data in a more intuitive way when handling session-specific information. You no longer need to manually clear LocalStorage whenever the user starts a new session. The browser handles this for you, keeping your codebase cleaner and reducing the potential for bugs.