'What is the difference between a local storage located on the http site and another located in the https site?

I heard that there is a difference between a local storage located in the http site and another located in the https site, so what is the difference?



Solution 1:[1]

so what is the difference?

The scheme (sometimes called "protocol") is part of the origin of the page. Every distinct origin gets its own store, isolated from the stores for other origins. Since http://example.com and https://example.com are different origins, their stores are isolated from each other just as much as the ones for https://a.com and https://b.com.

The functionality of the stores is the same, it's just they have different contents, because they're for different origins.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 T.J. Crowder