How to work with Session at the / jquery angle

Asked

Viewed 221 times

0

I’m developing a website where I need to store in the section some data as surveys performed.

We chose to develop the system’s from in angular/jquery. In php I saw that there are Sesssions. These Sesssions store the data on the server, right?

Is there a similar way that/jquery would treat this? I see that storing these types of data in the localStorage would be polluting, so I’m in doubt if using Angular or Jquery could achieve something similar that would be done using Lade.

I would like to conclude by asking if Angular/Jquery are good tools for this type of application (a Marketplace, for example).

  • Why does it become polluting? If you have enough free storage, why not use it? In fact it is generally preferable, when storing this in the browser, decreases the server’s used resources. But if there is some advantage and this resource consumption on the server will not be a problem, you can use the sessions. Regarding your question, it depends on what your marketing needs to have, what are the prerequisites?

1 answer

-1

You can use localStorage or sessionStorage Example:

localStorage.setItem('dados', '{name:"railson", idade:26}');

and to recover:

localStorage.getItem('dados');

The difference between the location Storage pro Session is that if Session closes the browser tab you lose the data, the location is there until you delete.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.