How to get local server side HTML5 storage values

I am a .Net developer, I know that HTM5 localstorage is a client-side storage technology. I want to get server side local storage data.

To get the cookie value from the server side, we have Request.Cookie in ASP.NET. Is there any solution like taking a local memory value directly on the server side? Please guide me. I am using the .net 4.0 framework

Thanks Jibu

+8
source share
3 answers

You need to transfer this information from the client to the server using standard HTTP methods. Using javascript, you can fill in:

  • Hidden fields
  • Query String Parameters
  • Post
  • Ajax call to server
  • ...

It all depends on how your application is organized, what information is stored, its volume, whether you want to redirect or not, but in all cases this should be done using javascript, as this is the only way to access the data stored in localStorage.

+9
source

Not. The whole point of local storage is that it is local. One of the advantages of this method is that you can store a lot of data in it. One of the advantages of cookies is that they are tiny, so the overhead associated with including them in every HTTP request to this host is small. There two advantages are incompatible, so you do not want them in a single technology.

If you want to receive data on the server, you need to force the client to explicitly send it (for example, through Ajax).

+4
source

You can save the data in a cookie .

0
source

All Articles