I almost used localStorage my every project. For example:
let OrderID = document.querySelector(".orderNum").innerText; window.localStorage.setItem("OrderID", OrderID);
After that, I redirect another page without any query string. I still need to OrderID. This is the best solution at the moment.
I did not store any important information in localStorage. Yes, I know we shouldn't store any password or related information in localStorage.
What about OrderID like information? Should I use? I don't want to use server-side sessions.
For example, I completed Order. I delete key from localStorage.
window.localStorage.removeItem("OrderID");
Thanks for this great article.
That seems fine to me!
After that, I redirect another page without any query string. I still need to OrderID. What about OrderID like information? Should I use? I don't want to use server-side sessions.
You've just discovered POST.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I almost used localStorage my every project. For example:
After that, I redirect another page without any query string. I still need to OrderID. This is the best solution at the moment.
I did not store any important information in localStorage. Yes, I know we shouldn't store any password or related information in localStorage.
What about OrderID like information? Should I use? I don't want to use server-side sessions.
For example, I completed Order. I delete key from localStorage.
Thanks for this great article.
That seems fine to me!
You've just discovered POST.