Ive always the Zen theme and added additional CSS and JS files in the page's tpl file, rather than using the .info file. Is their any performance or other downside to my method?
Thanks
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityYes, the JavaScript cannot be aggregated meaning that instead of asking for a single (few) css/js files, the browser will have to ask for more files which is slower and required more work of your web server.
Depeding on how many JS and CSS files you add in your page.tpl.php
you can get a noticeable performance improvement using the .info
file method. It's also a lot better should you need to use your theme as a base theme, since it allows for better alters of the JS/CSS files.
drupal_add_foo
function.
Mar 18, 2012 at 20:23