joomla

joomla

I just remove some scripts froom my Joomla site by adding a few lines to my Joomla default template index.php file.

I added these lines.

//remove mootools.js and caption.js
$headerstuff=$this->getHeadData();
reset($headerstuff['scripts']);
foreach($headerstuff['scripts'] as $key=>$value){
  unset($headerstuff['scripts'][$key]);
}
$this->setHeadData($headerstuff);

It looks like this in my template index.php file.

<?php
//remove mootools.js and caption.js
  $headerstuff=$this->getHeadData();
  reset($headerstuff['scripts']);
  foreach($headerstuff['scripts'] as $key=>$value){
    unset($headerstuff['scripts'][$key]);

  }  
  $this->setHeadData($headerstuff);

defined( ‘_JEXEC’ ) or die( ‘Restricted access’ );
JPlugin::loadLanguage( ‘tpl_SG1? );
?>

Now my page loads in 3-4 seconds instead of 6 seconds.

I learned how to remove from Joomla mootools.js and caption.js from Joomla1.5 at : http://www.eboga.org/cms/joomla/how-to-remove-mootoolsjs-and-captionjs-from-joomla15.html

I recommend backing up your index.php file for your template before trying this out since if your index.php file is hard to fix compared to html.

Share Online:
  • Digg
  • Twitter
  • Facebook
  • Technorati
  • StumbleUpon
  • del.icio.us
  • Yahoo! Buzz
  • FriendFeed
  • Reddit
  • MySpace
  • Slashdot
  • Mixx
  • NewsVine
  • Simpy
  • Diigo
  • Fark
  • Ping.fm
  • Propeller
  • Suggest to Techmeme via Twitter
  • RSS
  • email

Related stories you be interested in: