Follow us on Twitter!
Login - Register - Latests submissions

Reduce HTTP requests

 

Go to Site configuration > Performance, in Bandwidth optimizations section:

  • Set Optimize CSS files to Enabled
  • Set Optimize JavaScript files to Enabled
  • Save your settings

It is recommended to put JavaScript files at the bottom of your document (i.e. your theme page.tpl.php). Here is an example with Garland, but it should be the same with other themes. Search for the line <?php print $scripts ?>:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
  <head>
    <?php print $head ?>
    <title><?php print $head_title ?></title>
    <?php print $styles ?>
    <?php print $scripts ?>
  </head>

Cut and paste it just before the <?php print $closure ?> statment and before the closing </body> tag, as shown below:

  <?php print $scripts ?>
  <?php print $closure ?>
  </body>
</html>


jchatard's picture