Thinking Web Publishing? Think YouNeedItAll.com!

Social Media Networking

web design, web development and web technology news folow web designer and web programmers in new york on twitter
become a friend of Nikolay. Web design and Web developer in syracuse, new york

Site Statistics

Content View Hits : 597739

Da Vinci Art Gallery

LEONARDO DA VINCI's Art Gallery, Live, Paintings, Inventions, Secrets and History of Renaissance
How to Remove mootools.js
How to remove mootools.js
Web Development and Web Technology
Written by Nikolay Gul   
I will start with easiest way to remove mootools.js and caption.js from you templates.
Just comment or remove them...
However there are some other more fancy ways: For most Joomla 1.5 template, they don't use mootools.js and caption.js at all. These two JavaScript libraries are mainly used in the administrator control panal. Their size are about 75K, and decrease the response speed of Joomla site. Here I introduce a method to remove the two JavaScript libs.
To make sure your Joomla site have the two scripts in the front site, you can look you site's html source code and will find the following code:
  

To remove the above javascript's import, you just need to add the following code at the top of your template's index.php file.
		getHeadData();
		reset($headerstuff['scripts']);
		foreach($headerstuff['scripts'] as $key=>$value){
		  unset($headerstuff['scripts'][$key]);
		}		
		$this->setHeadData($headerstuff);
		?>
 
Clear cache and go back to you front site's source code, you will find the mootools.js and caption.js gone.
 
Web Templates Sale, Full site templates Sale, flash templates sale


Email or Call:(315) 378-9729 and Search for www.YouNeedItAll.com @ Nikolay Gul 2009 © All rights reserved