Hi,
I'm running a community driven Drigg (similar to Digg) site with regular visitors and so the performance is really the key here. Drigg runs with the help of a module called Extra Voting Vorms, which is a javascript voting widget. The .js file itself is usually located at /sites/all/modules/extra_voting_forms/extra_voting_forms.js
So far I've been putting the JS aggregator script at the top of the page.tpl because when I put it at the bottom, while each page loads this voting widget appears as a set of very ugly and scary radio buttons. This is a major drawback in terms of pageoad speed and performance.
I would love to be able to put the extra_voting_forms.js at the top of the page.tpl and the rest of JSaggregated file at the bottom. (I tried excluding it from the list of aggregated files on the Performance page, but that didn't work.) How can I do this??? Could you possibly lend a tip?
Many thanks!
Comments
Comment #1
robloachI'd like to split the aggregator exclude settings in two, one that's sent to the top, and one that's sent below the aggregated file. Thoughts?
Comment #2
drupalina commentedI'm not a coder, so I can't help you all that much on this one.
But here are some thought: Provide a README or a Reply to this comment on how to do it mannualy. Theoretically, it should be possible to
A) place the JS aggregator code at the bottom of the Page.tpl,
B) exclude the JS file that you don't want at the bottom aggregated with the rest, and
C) Call only the excluded JS file at the top of the Page.tpl
The first 2 steps are easy. I just don't know what code to use for the last step ;)
Comment #3
robloachRight now, you can exclude files to be placed right after the aggregated file. There isn't any setting for excluding files to be placed before the aggregated file though. Any patches welcome ;-) .
Comment #4
derjochenmeyer commented