How don't share LocalStorage on the same subdomain #2470
-
Hello, We have completely different websites on the same subdomain : sub.domain.com/site1 The problem is that the localstorage in the browser (where pinia saves the data) automatically shares the data as if it were a single website (sub.domain.com) , even though they are 2 different sites. Example : export const piniaStore = defineStore('default-store', { Is it possible to differentiate the localstorage between these 2 websites ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You cannot use Local Storage for this, it doesn't have that functionality. You could use cookies. |
Beta Was this translation helpful? Give feedback.
You cannot use Local Storage for this, it doesn't have that functionality. You could use cookies.
Another way would be to host the page in different subdomains