+
Skip to content

[Feature Request] An option to automatically add location.pathname to keys #243

@xiety

Description

@xiety

When hosting Blazor Wasm on Github Pages, all my repositories have the same origin. So localStorage items are shared among all my repositories.

So, I want an option to prefix every key with the current location.pathname

Workaround is to patch JS methods like in this example:

https://github.com/TomasHubelbauer/github-pages-local-storage/blob/main/index.js

localStorage.constructor.prototype.getItem = (key) => getItem.apply(localStorage, [location.pathname + ':' + key]);

Or manually add prefixes to all method calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature RequestRequest to add a new featureTriageIssue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载