Answer the question
In order to leave comments, you need to log in
How to transfer data from one tab to another?
Good afternoon, ladies and gentlemen. Need help. The client has 2 tabs open in the store, one with selected products, the other with a product catalog. When you click on a product, it goes to your favorites. How can I parse the product that the client added immediately. So that when switching the tab to favorites, the client has already seen the product that he has chosen?
The work takes place with three front-end pillars. No frameworks.
Answer the question
In order to leave comments, you need to log in
When adding a product to favorites or a shopping cart, we write in localStorage the time of such addition and information about the product.
"Favorites" listens to the storage event , and if there is a fresh label in it, it will be updated.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question