Disable mod_pagespeed (no server conf access, .htaccess doesn’t work)
Create a .htaccess file, add below text and upload using ftp program. We are also a hosting provider and use Pagespeed. Modpagespeed Off
Create a .htaccess file, add below text and upload using ftp program. We are also a hosting provider and use Pagespeed. Modpagespeed Off
If you are looking to reduce the size using coding itself, you can follow this code in php. <?php function compress($source, $destination, $quality) { $info = getimagesize($source); if ($info[‘mime’] == ‘image/jpeg’) $image = imagecreatefromjpeg($source); elseif ($info[‘mime’] == ‘image/gif’) $image = imagecreatefromgif($source); elseif ($info[‘mime’] == ‘image/png’) $image = imagecreatefrompng($source); imagejpeg($image, $destination, $quality); return $destination; } $source_img … Read more
If you don’t mind using jQuery, here is a simple code snippet to help you out. (Otherwise comment and I’ll write a pure-js example function loadStyleSheet(src) { if (document.createStyleSheet){ document.createStyleSheet(src); } else { $(“head”).append($(“<link rel=”stylesheet” href=””+src+” />”)); } }; Just call this in your $(document).ready() or window.onload function and you”re good to go. For #2, … Read more
This is because Google recently changed the page speed tool to better reflect an increasingly mobile web. Mobile data networks have different performance characteristics than wired or wifi so you need to do different things to optimize for them. Above-the-fold (ATF) is simply the first screen’s worth–anything you don’t need to scroll to see. Obviously, … Read more
If you’re really interested in the technical details, check out the source code: png_optimizer.cc jpeg_optimizer.cc webp_optimizer.cc For PNG files, they use OptiPNG with some trial-and-error approach // we use these four combinations because different images seem to benefit from // different parameters and this combination of 4 seems to work best for a large // … Read more