8 years 9 months ago
I've been working with Responsive2 and Zentools 2 and was attacking the page speed (both pagespeed and yslow) which hit me hard on Pinterest being loaded. I noticed Zentools2 is loading Pinterest script regardless of whether Pinterest has been added to the module settings (slows the site on gzip and a host of other reasons). After commenting out a little php my score went up 3% in the right direction (got to 98% on both yslow and pagespeed so far!). I just wanted to confirm if this is a bug and if there are any consequences to the following changes (or a better approach) and I did the right thing!:
file: modules/mod_zentools2/tmpl/blocks/pinterest.php
<?php
/**
* @package Zen Tools
* @subpackage Zen Tools
* @author Joomla Bamboo - [email protected]
* @copyright Copyright (c) 2013 Joomla Bamboo. All rights reserved.
* @license GNU General Public License version 2 or later
* @version 1.8.5
*/
defined('_JEXEC') or die('Restricted access');
// Get the doc
$doc = JFactory::getDocument();
$doc->addScript("//assets.pinterest.com/js/pinit.js"); ?>
I changed the code to comment out the whole function within the php:
<?php
/**
* @package Zen Tools
* @subpackage Zen Tools
* @author Joomla Bamboo - [email protected]
* @copyright Copyright (c) 2013 Joomla Bamboo. All rights reserved.
* @license GNU General Public License version 2 or later
* @version 1.8.5
defined('_JEXEC') or die('Restricted access');
// Get the doc
$doc = JFactory::getDocument();
$doc->addScript("//assets.pinterest.com/js/pinit.js");*/ ?>
Loving Zentools2
!
Jaimie