Speed up website by decreasing paze size

How to Decrease web page size?

new of my website total website SIZE is 3.08MB

but Optimal page size equal or less than to 512KB less than 1 MB to load quickly in mobile browsers as well as the desktop too.

 

512 KB not possible at least 1 MB is ok My goal.

Serer response time should be under 200ms or 0.2s  don’t buy single core VPS plans

here are tools you required

  1. Pingdom speed test
  2. GT Metrix
  3. Google page Insights
  4. quick sprout maybe

However, most popular websites have worse about optimizing for mobile and Speed but they still rank at same place maybe because of their Authority, trustworthy, freshness, branding.

digging very deep into  this topic not necessary for regular blogger.

Quicksprout Speed test report

My web page size by Total SIZE 3.02MB

  • Script 2.1MB  and 41 requests (Including google Adsense, Analytics, jQuery, web fonts)
  • HTML 401.9KB 12 Requests
  • CSS 225.6 KB 6 Requests (google fonts, blogger css bundle, )
  • Other 197.4 KB 5 Requests
  • Images 182.7 KB 26 requests

Speed Load time 1.43 minutes.

  • Script: 39.0%
  • Image: 27.3%
  • HTML: 24.2%
  • CSS: 5.7%
  • Other: 3.8%
  1. Make fewer HTTP requests
  2. A+Use a Content Delivery Network (CDN)
  3. B+Add Expires headers
  4. Compress components with gzip
  5. C- Avoid HTTP 404 (Not Found) error
  6. A+Avoid URL redirects
  7. Reduce DNS lookups
  8. Configure entity tags (ETags)
  9. A+ Put CSS at top
  10. Put JavaScript at bottom
  11. A+Reduce the number of DOM elements
  12. Minify JavaScript and CSS

I alway get the  high percentage of requests and page size at quick sprout when comparing to GTmetrix. (its I marks that is my own site they need to convert as paid customers by showing some kind of errors  maybe I guess.)

 

Pingdom Speed Test Result

  1. PageSpeed Grade A (94%)
  2. YSlow Grade C (70%)
  3. Page load time 5.4s
  4. Total page size 1.28MB
  5. Total # of requests 83

Again retested but this time they took another server to test, but the results varied here

  • PageSpeed Score (93%)
  • YSlow Score (69%)
  • Page Load Time4.0s
  • Total Page Size 1.30MB
  • Requests 91

Recommendations

Defer parsing of JavaScript

599.6KiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering.

This means Loading Script asynchronously

async and defer

RECOMMENDATIONGRADETYPEPRIORITY
Defer parsing of JavaScript
F (0)
JSHIGH
Specify image dimensions
F (4)
IMAGESHIGH
Leverage browser caching
C (75)
SERVERHIGH
Remove query strings from static resources
C (77)
CONTENTHIGH
Avoid bad requests
C (78)
CONTENTHIGH
Minimize redirects
C (78)
CONTENTHIGH
Specify a Vary: Accept-Encoding header
C (78)
SERVERHIGH
Combine images using CSS sprites
C (78)
IMAGESMEDIUM
Optimize images
B (85)
IMAGESHIGH
Prefer asynchronous resources
B (85)
JSMEDIUM
Specify a cache validator
A (90)
SERVERHIGH
Enable Keep-Alive
A (98)
SERVERHIGH
Minify JavaScript
A (98)
JSHIGH
Serve scaled images
A (98)
IMAGESHIGH
Enable gzip compression
A (99)
SERVERHIGH
Minify CSS
A (99)
CSSHIGH
Minify HTML
A (99)
CONTENTLOW
Avoid a character set in the meta tag
A (100)
CONTENTHIGH
Avoid landing page redirects
A (100)
SERVERHIGH
Inline small CSS
A (100)
CSSHIGH
Inline small JavaScript
A (100)
JSHIGH
Minimize request size
A (100)
CONTENTHIGH
Optimize the order of styles and scripts
A (100)
CSS/JSHIGH
Put CSS in the document head
A (100)
CSSHIGH
Serve resources from a consistent URL
A (100)
CONTENTHIGH
Specify a character set early
A (100)
CONTENTHIGH
Avoid CSS @import
A (100)
CSSMEDIUM

Moe script o footer or defer parsing

// Custom Scripting to Move JavaScript from the Head to the Footer
function remove_head_scripts() {
remove_action(‘wp_head’, ‘wp_print_scripts’);
remove_action(‘wp_head’, ‘wp_print_head_scripts’, 9);
remove_action(‘wp_head’, ‘wp_enqueue_scripts’, 1);

add_action(‘wp_footer’, ‘wp_print_scripts’, 5);
add_action(‘wp_footer’, ‘wp_enqueue_scripts’, 5);
add_action(‘wp_footer’, ‘wp_print_head_scripts’, 5);
}
add_action( ‘wp_enqueue_scripts’, ‘remove_head_scripts’ );

// END Custom Scripting to Move JavaScript

add aboe code funtcions php in actie theme.

https://wordpress.org/plugins/scripts-to-footerphp/

 

Defer parsing code in WordPress

function defer_parsing_of_js ( $url ) {
if ( FALSE === strpos( $url, '.js' ) ) return $url;
if ( strpos( $url, 'jquery.js' ) ) return $url;
return "$url' defer ";
}
add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );

add aboe code in below functions.php or use WP deferred javaScript plugin.

Enable Gzip compression to reduce Size upto 80%.

simple add below code to htacess

 

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddType x-font/otf .otf
AddType x-font/ttf .ttf
AddType x-font/eot .eot
AddType x-font/woff .woff
AddType image/x-icon .ico
AddType image/png .png
AddType text/css .css

checkout more speed up tips for wordpress.

Reference:

Speed Is A Killer – Why Decreasing Page Load Time Can Drastically Increase Conversions

http://blog.woorank.com/2013/01/20-quick-tips-to-optimize-page-load-time/

Update shortly..