SEO request for Vaadin

  1. Please put title tag immediately after head tag.

notice the title is written last:

protected void writeAjaxPageHtmlHeader(final BufferedWriter page,
            String title, String themeUri, final HttpServletRequest request)
            throws IOException {
        page.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n");

        WebBrowser browser = getApplicationContext(request.getSession())
                .getBrowser();
        if (browser.isIE()) {
            // Chrome frame in all versions of IE (only if Chrome frame is
            // installed)
            page.write("<meta http-equiv=\"X-UA-Compatible\" content=\"chrome=1\"/>\n");
        }

        page.write("<style type=\"text/css\">"
                + "html, body {height:100%;margin:0;}</style>");

        // Add favicon links
        page.write("<link rel=\"shortcut icon\" type=\"image/vnd.microsoft.icon\" href=\""
                + themeUri + "/favicon.ico\" />");
        page.write("<link rel=\"icon\" type=\"image/vnd.microsoft.icon\" href=\""
                + themeUri + "/favicon.ico\" />");

        [b]
page.write("<title>" + safeEscapeForHtml(title) + "</title>");
[/b]
    }

P.S. And append a new line after it (“\n)”, it ends up more human readable :slight_smile: