code: public void setJavaScriptEnabled(boolean javaScriptEnabled)
      {
          this.javaScriptEnabled = javaScriptEnabled;
  
          // and now also store this information inside a cookie!
          FacesContext facesContext = FacesContext.getCurrentInstance();
          if (facesContext != null)
          {
              Object r = facesContext.getExternalContext().getResponse();
              if (r instanceof HttpServletResponse)
              {
                  Cookie cookie = new Cookie(COOKIE_NAME_NOSCRIPT_ENABLED, "" + javaScriptEnabled);
                  cookie.setPath("/"); // for all the server
                  HttpServletResponse response = (HttpServletResponse) r;
                  response.addCookie(cookie);
              }
          }
      }
docs: Set it to <code>false</code> if you don't like to use the
  JavaScript based client side windowhandler. In this case
  the request will be returned directly.
  @param javaScriptEnabled