Save user object in Session Storage
问题 I am using Angular 2 and Typescript and wanted to save the user object like a global variable so it hasn't to be retrieved multiple times. I found the session storage and now save the user object there. Do you think it is good practice to store it there or is the data too sensitve? If so, what other kind of cache could I use? Here is the code I use right now: user.service.ts: getProfile() { let cached: any; if (cached = sessionStorage.getItem(this._baseUrl)) { return Observable.of(JSON.parse