How to access html 5 localstorage asp.net mvc 3 controller / pipleline

I am currently setting / getting localstorage values โ€‹โ€‹through javascript, which works fine. However, I would like to get values โ€‹โ€‹from localstorage in my controller or elsewhere in the request pipeline through server-side code. (Similar to how Request.Cookies returns from an HttpContext)

Does anyone know where the local repository is hiding? I see this in firebug / chrome, so I know that its set is great, and I can pull it through javascript.

+6
source share
1 answer

localStorage remains on the client side and is not passed in the request.

If you want to transfer any localStorage information to the server, you will need to get the necessary values, and then either put them in hidden fields in your form, or use other means (for example, JSON) to transfer the value for the server.

+7
source

Source: https://habr.com/ru/post/900064/


All Articles