Browser troubleshooting
Understand which pages share browser storage
Browser storage is generally scoped by origin, not by a page’s folder name. Pages with the same protocol, hostname, and port can share an origin even when they live under different paths.
Worked example
Browser console example · use a disposable page on your own site
const urls = [
"https://example.com/tool/", "https://example.com/articles/",
"http://example.com/tool/", "https://example.com:8443/tool/"
];
console.log(urls.map(value => new URL(value).origin).join("\n"));How it works
The first two addresses share an origin. Changing protocol or port changes it. This explains why one tool and another page on the same site may access the same localStorage area, while a different subdomain or local development port does not.
Limits and mistakes
Browser privacy partitioning and embedded contexts can add further boundaries. Folder names alone do not isolate data from other same-origin scripts. Use an appropriate trust and hosting design for applications that need stronger separation.
Check the result
Confirm the first two output origins match and the others differ. When data appears missing after a move, compare the complete origin before assuming it was deleted.
Sources
Reference documentation for the behavior used in this guide: