If you use a server side session object the information (i.e. locale) will be probably stored in a Cookie and transmitted whenever you initiate a HTTP request (communicate with the backend) and it is always available on the backend.
If you store it as a static variable you have to add to manually to the request to the backend. Furthermore with Cookies you can specify a lifespan which goes beyond the session and the information is also available when you refresh the browser. That's not possible with client side variable unless you use HTML5 localcache.
to summarize:
Server side session:
Advantages:
- transmitted in every request (so it's always available on the backend)
- lifespan beyond current session (via Cookie expire date)
- Always transmitted -> small overhead
Advantages:
- You can control when the information is transmitted
- Information is lost if you refresh or close the browser
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/W-N6sZpK8T4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment