diff --git a/packages/core/src/browser/storage-service.ts b/packages/core/src/browser/storage-service.ts index 1e86823077ffa..d05a965524704 100644 --- a/packages/core/src/browser/storage-service.ts +++ b/packages/core/src/browser/storage-service.ts @@ -35,7 +35,9 @@ interface LocalStorage { export class LocalStorageService implements StorageService { private storage: LocalStorage; - constructor( @inject(ILogger) protected logger: ILogger) { + constructor( + @inject(ILogger) protected logger: ILogger + ) { if (typeof window !== 'undefined' && window.localStorage) { this.storage = window.localStorage; } else { @@ -62,6 +64,7 @@ export class LocalStorageService implements StorageService { } protected prefix(key: string): string { - return 'theia:' + key; + const pathname = typeof window === 'undefined' ? '' : window.location.pathname; + return `theia:${pathname}:${key}`; } }