AO Web Resources Servlet

project: alphamanagement: previewpackaging: developmental
java: >= 8java ee: >= 6semantic versioning: 2.0.0license: LGPL v3

Web resource management in a Servlet environment.

TODO

  • Support scripts at end of body?
    https://developers.google.com/speed/docs/insights/mobile#PutStylesBeforeScripts
    This would also help by adding scripts actually used by the page
    The scripts generated by write(Date|Time|DateTime) "scriptOut" could also be saved for the very end.
    Is this still correct with async / deferred / ... scripts now?
    AO Taglib: allow queuing of all scripts until end of page
    	script src = would be added as-is
    	script with body would be written from their queued for
    	use body.onload script with a setTimeout?
    		https://blog.jamesdbloom.com/JSAndCSSMinificationWithWRO4J.html
    		https://eager.io/blog/how-to-decide-when-your-code-should-run/
    		https://www.html5rocks.com/en/tutorials/speed/script-loading/
    		https://www.danielcrabtree.com/blog/25/gotchas-with-dynamically-adding-script-tags-to-html
    	Are we trying to recreate Require.JS here?
  • Does it make sense to keep track of which resources are required by a specific request, instead of including all registered CSS resources? Can we just put a link tag wherever in HTML 5 (which we could use to add on first use)? Or, would this require full buffering to put them all in the head? With our aggressive one-year cache of CSS files (and other static resources) enabled by ao-servlet-last-modified, maybe this is really a non-issue.
  • Should there be a group registry on the current request / session? It would let request processing activate groups based on what is actually needed by the page.