[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 240
  • Last Modified:

Cookies and redirect

I need to modify a cookie value and afterwards do a sendRedirect. Is it possible??
0
yo_
Asked:
yo_
1 Solution
 
siliconeagleCommented:
you can do it in javascript by just sending a webpage
<script>
document.location='<new_url>';
</script>

obviously you dont want much else on this page.

you can modify the cookies in the response header or just in javascript before you do the redirect, make sure the new url has the same domain to be able to use the cookie value.
0
 
yo_Author Commented:
I must be doing something wrong  becasuse in the destination page  I am not getting the cookie updated.

Thank you
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now