Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在 java servlet 中创建基于时间的 cookie。基于时间的 Cookie 在 servlet 中创建,持续时间为 10 分钟。cookie 未从浏览器(Firefox、Chrome)的 cookie 列表中删除/移除
谁能告诉我如何在超时后自动从浏览器中删除 cookie?
提前致谢。
In your servlet you can setMaxAge(0), make sure you don't forget to addCookie to the response after setting the max age to 0.