Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Using CDN for jQuery
Make AddJsFile method in library\core\class.controller.php to look as follows:
This approach allow to load JQuery library from nearest Google server, speeding up loading.
Overall, if you installed many plugins your loading process mecome much more slow with many CSS and JS files.
Integrating some plugins into core scripts and styles (I mean Tagging Enchanced, Voting and few others) could help slightly.
public function AddJsFile($FileName, $AppFolder = '') {
if ($FileName == 'jquery.js') { $FileName = 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'; }
$this->_JsFiles[] = array('FileName' => $FileName, 'AppFolder' => $AppFolder);
}
This approach allow to load JQuery library from nearest Google server, speeding up loading.
Overall, if you installed many plugins your loading process mecome much more slow with many CSS and JS files.
Integrating some plugins into core scripts and styles (I mean Tagging Enchanced, Voting and few others) could help slightly.
1
Comments
http://www.vanilla-wiki.info/Libraries/CDN
But using plugins for such low level and small things seems inappropriate, much better to have special checkbox on some settings form that writes value to config file. And all functionality will be present by default. I think it is better.
Plugins are sometimes overused in Vanilla.
I think that approach used by most forums considering admin settings is more appropriate than current one in Vanilla where many settings can be only set via manual config editing. May be make Advanced settings page, but we need this.
And making plugin for two lines that must be on every large site using jQuery by default? Are you serious?
By adding the "Use CDN for jQuery?" checkbox, now every Vanilla user from now until time untold needs to decide whether to check it, and maybe get confused about what CDN and jQuery are, or decide to ignore it. That cost them time. However, someone like you who knows what a CDN is can easily find the Addons repo and find a simple little plugin that does that esoteric thing you want.
Making great software isn't just adding more, it's about deciding what to leave out.
being UX designer, I can say that this common "more is worse" thing is fallancy and a bad one.
No one prevents you to hide advanced options using good interface form novice users.
But gently speaking I know not so much novice users who run average or big sized forums. And all options that are not required on small forums can be hidden in special section.
Moving such functions to addons makes them hard to support and hard to change.
Looking at state of Addons section I can say that this is very bad idea then people can find even old long unsuported plugins that can even break his forums for some time.
Need use `HeadModule_BeforeToString_Handler($Head)`
Or add new event EventArguments/BeforeAddJs like BeforeAddCss in Gdn_Controller.
If you'll be always combining CSS, it won't be good. As caching won't work properly.
Minify CSS or JS is also not so usable, if web server use gzip (and it is so in most cases) :-)
This optimizations are fine for abstract static pages or simple cms with one style, but for engines like Vanilla approach must be pretty manual and smart. This is why original Minify plugin idea is not so good.
Generally only parts that need to be optimized are discussions list, discussion list and categories list. And 90% of optimizations on client side lie in merging Gravatar, Voting, Tagging and few other plugins, their JS and styles.
I have no apache/mod_gzip/mod_deflate.
My statistics by YSlow for news page. 9 JavaScript File, 20 Stylesheet File, not bad, ha?
My understanding is that it just looks for tags, and combines JS and CSS files and supply these two files instead of bunch of CSS and JS?
And do it on the fly on each request?
Looks like it is using some kind of cache.