I really like to have smarter version of this integrated inside Vanilla (working at AddJSFile and AddCSSFile level). I also want to ability to specify exact parameters of each view in new versions of this methods. Ala AddJSFile($file, $inviews_array, .... ), and Vanilla will look at curret parameter of controller (ala "all" for categories) and add your file only if it match to one of your parameters. AddJSStatic() or AddCSStatic() could be useful (functon that will directly append minified version of your CSS file to controller CSS, and make such file if it is not present). May be better ideas exist introducing optimization for larger sites (ala making10min cache for categories/all, discussions/all and discussions list in categorie pages).
I really don't understand what you're talking about or how minification could be more efficient than it already is. It's already creating custom minified files for each view, not creating one gigantic one that's served to all pages.
@Lincoln Having different JS and CSS files for each view is not good idea, really. As browser make request again for almost the same content. Did you made some test cases to look how it works, emulating many connections from users with empty cache (new users are always major part of each forum viewers) goting from one view to other?
@Lincoln I mean really ability to work at page level (or one view represented by one PHP in views folder for controller, as I understand it). And minify file together then 60-90% is the same is not optimal, we need to allow plugin authors to decide that is constant important part, and that they'll supply as separate JS and CSS files that depend on exact page used. Of course, this works for either large plugins or plugins located on most forum views or no only one-two pages view. For other plugins it do not make things worse though.
You can specify the exact page, that's why I don't understand what you're talking about. If a plugin author gloms something on in too many places, than take it up with the plugin author or fix it.
OK, show me some example, and I'll fix it in some plugins that I am using. Both Tagging and Voting plugins add their files to every controller pages (as procedures to do this are placed in BeforeRender and they do not check other conditions).
Comments
I also want to ability to specify exact parameters of each view in new versions of this methods. Ala AddJSFile($file, $inviews_array, .... ), and Vanilla will look at curret parameter of controller (ala "all" for categories) and add your file only if it match to one of your parameters.
AddJSStatic() or AddCSStatic() could be useful (functon that will directly append minified version of your CSS file to controller CSS, and make such file if it is not present).
May be better ideas exist introducing optimization for larger sites (ala making10min cache for categories/all, discussions/all and discussions list in categorie pages).
Did you made some test cases to look how it works, emulating many connections from users with empty cache (new users are always major part of each forum viewers) goting from one view to other?
/discussion/x = 1 view
/discussions = 1 view
/profile/x = 1 view
It's server-side caching so it's irrelevant who's doing the viewing.
I mean really ability to work at page level (or one view represented by one PHP in views folder for controller, as I understand it).
And minify file together then 60-90% is the same is not optimal, we need to allow plugin authors to decide that is constant important part, and that they'll supply as separate JS and CSS files that depend on exact page used. Of course, this works for either large plugins or plugins located on most forum views or no only one-two pages view. For other plugins it do not make things worse though.
Both Tagging and Voting plugins add their files to every controller pages (as procedures to do this are placed in BeforeRender and they do not check other conditions).