Storage of Cookies and Requests with Cookies

Asked

Viewed 48 times

-1

Page cookies are sent to the server in all requests or only when it is intentionally sent through javascript?

The localStorage is stored in the browser cache, and the cookie? It is stored in the browser or somewhere else in the user’s pc?

Is the cookie crossbrowser? (I had confused the concept of cross-browser, before I thought it was related to something "shared" between the browser, and not the actual definition of something "compatible" between the browsers).

Thanks for your answers.

1 answer

0


1- An HTTP cookie (a web cookie or browser cookie) is usually used to identify whether two requests came from the same browser - by keeping a user logged in, for example. It stores dynamic information for stateless HTTP protocol. That is, always send (if created) and the server has access.

2-Unlike cookies, the storage limit is much higher (at least 5 MB) and the information is never transferred to the server.

Web storage is by origin (by domain and protocol). All pages, from one source, can store and access the same data. Storage is done individually in each browser.

3- Both localStorage and coockies are cross-browser, follow an example of compatibility in localStorage: inserir a descrição da imagem aqui

And cookies:

inserir a descrição da imagem aqui

In the context of Jwts , Stormpath wrote a very useful article, describing possible ways to store them and the (dis) advantages related to each method follows the link: https://stormpath.com/blog/where-to-store-your-jwts-cookies-vs-html5-web-storage/

Browser other questions tagged

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