### Description Add content and an example for ... > It's good that we show that you can handle access storage in OnAfterRenderAsync. You could also detect whether the current render mode is interactive or not before accessing browser storage. I think that should work even in OnInitializedAsync. Cross-ref: https://github.com/dotnet/AspNetCore.Docs/pull/35873#discussion_r2261975895 ### Page URL https://learn.microsoft.com/en-us/aspnet/core/blazor/state-management/protected-browser-storage?view=aspnetcore-9.0 ### Content source URL https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/state-management/protected-browser-storage.md ### Document ID 8e81e30e-a6ea-209f-3039-7b900da642f0 ### Platform Id 123408a5-b68c-1c59-f314-24fd7682efd4 ### Article author @guardrex ### Metadata * ID: 8e81e30e-a6ea-209f-3039-7b900da642f0 * PlatformId: 123408a5-b68c-1c59-f314-24fd7682efd4 * Service: **aspnet-core** * Sub-service: **blazor** [Related Issues](https://github.com/dotnet/AspNetCore.Docs/issues?q=is%3Aissue+is%3Aopen+8e81e30e-a6ea-209f-3039-7b900da642f0)