Timeline for Aura : Passing attribute across different components in containment hierarchy
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 10, 2022 at 20:35 | comment | added | SfdcBat | yes, was able to verify using that. I am not sure about this but wanted to ask how does Lockerserivce allow using sessionStorage? Is that allowed? | |
Feb 10, 2022 at 20:24 | comment | added | glls | you can list the storage items, or your your browser to check the actual key, because SF will prepend the ProfileName key with some namespace and or id's, so, if you directly try with 'ProfileName' in your console it wont work | |
Feb 10, 2022 at 20:15 | comment | added | SfdcBat | Could I verify whether this session storage is not accessible? Is there a way to do it from the console of a new tab? I tried sessionStorage.getItem('ProfileName') but it doesn't seem to work | |
Feb 10, 2022 at 20:13 | comment | added | SfdcBat | Let us continue this discussion in chat. | |
Feb 10, 2022 at 20:08 | comment | added | sfdcfox♦ | @SfdcBat sessionStorage is locked to a specific subdomain, and further enhanced by Locker Service/Lightning Web Security to sandbox each namespace (e.g. lightning, c, managed packages). The only concern would be if you installed unmanaged/unlocked packages; they could also access sessionStorage, as they have no namespace. If you trust your namespace's code, you should be fine. Circling back, though, using a cacheable method would save you a lot of trouble :D | |
Feb 10, 2022 at 20:02 | comment | added | SfdcBat | Can sessionStorage be accessed by any element open in the other tab or any other applications in same window? thinking of any security concerns? | |
Feb 10, 2022 at 20:01 | comment | added | sfdcfox♦ | @SfdcBat Then go for it, it should work just fine. | |
Feb 10, 2022 at 19:51 | comment | added | SfdcBat | Thanks for the suggestion! its not ISV | |
Feb 10, 2022 at 19:50 | comment | added | sfdcfox♦ | @SfdcBat Prefer sessionStorage, it's got a shorter lifespan. Remember also that both storages are locked to a single namespace. If you're not an ISV, it doesn't matter, but just be aware of that limitation. | |
Feb 10, 2022 at 19:46 | comment | added | SfdcBat | I was going towards Apex route but do have any thoughts on whether I can use localstorage in this case? Any drawback of using localstorage? | |
Feb 10, 2022 at 19:46 | history | edited | sfdcfox♦ | CC BY-SA 4.0 |
added 289 characters in body
|
Feb 10, 2022 at 19:41 | history | answered | sfdcfox♦ | CC BY-SA 4.0 |