I am working on a spring MVC app and found a strange issue that only happen on chrome. The logic is:
- user request a list of items
- user click on add new button and a bootstrap dialog popup allow user type in the name
- on submit, a post request sent to the server
- server create an new item and save it to db
- server store the new item id to cookie and send a redirect response to browser
- browser request item view page
- server pick up the item id from cookie and render the page
The above logic runs good on nearly all browsers (I didn't test on IE) except chrome. I found the root cause is chrome will store previous cookie with a different item id and at step 6 chrome send duplicate item id cookies to the server.
Any idea how to resolve this issue?
Chrome[Version 32.0.1700.41 m Aura]

Opera[Version 20.0.1353.0]

Firefox[Version 29.0a1 (2013-12-10)]

Safari[Version 5.1.7 (7534.57.2)] No screen capture. But it works