<<Back to Computer Repair + Web design Blog | Computer Topic Categories

My Joomla 1.5 page loads faster by adding a few lines to my index.php file to remove mootools.js and caption.js from loading on Template HTML file

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 and Bookmark:
  • Digg
  • Yahoo! Buzz
  • Facebook
  • Twitter
  • StumbleUpon
  • Reddit
  • del.icio.us
  • Slashdot
  • FriendFeed
  • MisterWong
  • LinkedIn
  • NewsVine
  • Propeller
  • Google Bookmarks
  • Yahoo! Bookmarks
  • Add to favorites
  • RSS
  • email
  • PDF
  • Print

More Related Tech Posts:

About Johnson Yip

I graduated from Vancouver Community College's Information technology Specialist certificate program in 2008 and became Comptia A+ IT Enterprise technician certified in 2009. I volunteer at a non-profit Computer Recycler and Refurbisher called Free Geek Vancouver. My interest includes computers, gadgets, art, movies, food, television, blogging, forums, websites and Video games. Welcome to my blog on computer, hardware, software, web design, and cms help. Enjoy your stay!
This entry was posted in CMS mySQL Blog Forum, Computer, Computer Tutorials, Joomla, Software, Website, software tutorial and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv Enabled

Spam protection by WP Captcha-Free