Does response.sendRedirect(DESTINATION_PAGE); cause session attribute values to be lost?

Posted on 2011-09-26
Last Modified: 2012-05-26
Does executing a javascript response.sendRedirect instruction cause the values of session attributes to be lost?
Question by:jwright9
LVL 11

Accepted Solution

MacAnthony earned 500 total points
ID: 36599577
Javascript doesn't have a response.sendRedirect function so I'm going to assume this is the java/jsp response object that you are sending. No, that should not by itself cause session values to be lost. What sendRedirect does is tells the client to request the url DESTINATION_PAGE. This request wouldn't look any different than some one clicking a link to that page from the browser.

You would have to do something to force the session to be reset or the client would have to restart loosing the session.
LVL 82

Expert Comment

ID: 36600647
some answer in this thread :

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Detect which div element is visible? ***Javascript Only solution*** 4 21
how can i get 4 nd 5 ? 3 31
Json Schema 8 32
Character counter breaks after adding EmojiOne Area 4 23
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (, we'll extend the program by adding a depth-…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question