BootstrapPageResponse response) {
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
Document document = response.getDocument();
DocumentType doctype = new DocumentType("html", "", "",
document.baseUri());
document.child(0).before(doctype);
Element head = document.head();
head.appendElement("meta").attr("http-equiv", "Content-Type")
.attr("content", "text/html; charset=utf-8");
/*
* Enable Chrome Frame in all versions of IE if installed.
*/
head.appendElement("meta").attr("http-equiv", "X-UA-Compatible")
.attr("content", "IE=11;chrome=1");
String title = response.getUIProvider().getPageTitle(
new UICreateEvent(context.getRequest(), context.getUIClass()));
if (title != null) {
head.appendElement("title").appendText(title);
}
head.appendElement("style").attr("type", "text/css")
.appendText("html, body {height:100%;margin:0;}");
// Add favicon links
String themeName = context.getThemeName();
if (themeName != null) {
String themeUri = getThemeUri(context, themeName);
head.appendElement("link").attr("rel", "shortcut icon")
.attr("type", "image/vnd.microsoft.icon")
.attr("href", themeUri + "/favicon.ico");
head.appendElement("link").attr("rel", "icon")
.attr("type", "image/vnd.microsoft.icon")
.attr("href", themeUri + "/favicon.ico");
}
Element body = document.body();
body.attr("scroll", "auto");
body.addClass(ApplicationConstants.GENERATED_BODY_CLASSNAME);
}