在skinUtil.java中為什麼不直接刪除cookie!

jini發表於2003-09-03
在skinUtil.java中為什麼不直接刪除cookie!

public static void deleteCookie(HttpServletRequest request,
            HttpServletResponse response, String cookieName)
    {
        // invalidate the cookie
        Cookie cookie = new Cookie(cookieName, "");
        // delete the cookie when the user closes their web browser
        cookie.setMaxAge(0);
        cookie.setPath("/");
        response.addCookie(cookie);
    }
<p class="indent">

相關文章