use of de.agilecoders.wicket.core.request.resource.caching.version.Adler32ResourceVersion in project oc-explorer by devgateway.
the class FormsWebApplication method optimizeForWebPerformance.
/**
* optimize wicket for a better web performance This will be invoked if the
* application is started with -Dwicket.configuration=deployment
*/
private void optimizeForWebPerformance() {
// add javascript files at the bottom of the page
setHeaderResponseDecorator(new RenderJavaScriptToFooterHeaderResponseDecorator("scripts-bucket"));
// The default is Development, so this code is not used
if (usesDeploymentConfig()) {
getResourceSettings().setCachingStrategy(new FilenameWithVersionResourceCachingStrategy("-v-", new CachingResourceVersion(new Adler32ResourceVersion())));
getResourceSettings().setJavaScriptCompressor(new GoogleClosureJavaScriptCompressor(CompilationLevel.SIMPLE_OPTIMIZATIONS));
getResourceSettings().setCssCompressor(new YuiCssCompressor());
getFrameworkSettings().setSerializer(new DeflatedJavaSerializer(getApplicationKey()));
getMarkupSettings().setStripComments(true);
} else {
getResourceSettings().setCachingStrategy(new NoOpResourceCachingStrategy());
}
getRequestCycleSettings().setRenderStrategy(RenderStrategy.ONE_PASS_RENDER);
}
use of de.agilecoders.wicket.core.request.resource.caching.version.Adler32ResourceVersion in project ocvn by devgateway.
the class FormsWebApplication method optimizeForWebPerformance.
/**
* optimize wicket for a better web performance This will be invoked if the
* application is started with -Dwicket.configuration=deployment
*/
private void optimizeForWebPerformance() {
// add javascript files at the bottom of the page
setHeaderResponseDecorator(new RenderJavaScriptToFooterHeaderResponseDecorator("scripts-bucket"));
// The default is Development, so this code is not used
if (usesDeploymentConfig()) {
getResourceSettings().setCachingStrategy(new FilenameWithVersionResourceCachingStrategy("-v-", new CachingResourceVersion(new Adler32ResourceVersion())));
getResourceSettings().setJavaScriptCompressor(new GoogleClosureJavaScriptCompressor(CompilationLevel.SIMPLE_OPTIMIZATIONS));
getResourceSettings().setCssCompressor(new YuiCssCompressor());
getFrameworkSettings().setSerializer(new DeflatedJavaSerializer(getApplicationKey()));
getMarkupSettings().setStripComments(true);
} else {
getResourceSettings().setCachingStrategy(new NoOpResourceCachingStrategy());
}
getRequestCycleSettings().setRenderStrategy(RenderStrategy.ONE_PASS_RENDER);
}
Aggregations