public void doIconSize ( StaplerRequest req , StaplerResponse rsp ) throws IOException , ServletException { String qs = req . getQueryString ( ) ; if ( qs == null ) throw new ServletException ( ) ; Cookie cookie = new Cookie ( "iconSize" , Functions . validateIconSize ( qs ) ) ; cookie . setMaxAge ( /* ~4 mo. */ 9999999 ) ; // #762 rsp . addCookie ( cookie ) ; String ref = req . getHeader ( "Referer" ) ; if ( ref == null ) ref = "." ; rsp . sendRedirect2 ( ref ) ; }
Changes the icon size by changing the cookie