How to force Grails Resource plugin load right after application started -
in grails project, use resource plugin control , manage resource files in application.
embedded project this:
plugins { runtime ":hibernate:$grailsversion" runtime ":jquery:1.8.3" runtime ":resources:1.2" }
but problem is: plugin loads resource files when first request comes up, make response of request (in situation login request) long. there solution force resource plugin run own necessary processes right after application started, no need wait first request?
thank much.
resources plugin allows manage resources in efficient , modular way. meaning can load resources required each pages. if resources taking long maybe loading unnecessary css,js on login page.
couple approaches can take:
optimize resources. use need. in somethingresources.groovy, can bundle resources , load each bundle when needed. example, required css,js needed login.
use
zipped-resources
,cached-resources
, oryui-minify-resources
plugin. transfer or load resources faster.resources plugin allows load resources in different part of page, loading js files @ end of page, simulates faster loading page.
disposition
btw, resources plugin pre-process css, js files @ start of application, unless there request client browser, resources not transferred client. optimizing them ease transition.
i hope help
Comments
Post a Comment