how do immediately see changes I made on a cookie?
so I have a javax.servlet.filter class that does a lot of things. one of the first things it does is change the value of a cookie (example: cookieX was originally set to "ABC" and I changed it to "ABC,DEF").
Before the browser gets a response (the filter has completed already but a Sling model is running this time), another piece of code retrieves the value of cookieX and checks if "DEF" is in the cookie. When the cookie is retrieve via the request object, I still see the original value (which is "ABC") and not the new one.
- From what I can see, this is inherent to the nature of cookies? (that is the values will not change until the browser gets a response?)
- Is there a workaround/fix?
Thank you.