While the principles of responsive web design can make sites look better on mobile devices, they don’t necessarily load faster than a site designed for desktops. And as more and more sophisticated WordPress themes emerge, with their multiple options and fancy sliders, websites just keep getting more and more bloated.
This presentation will help cut out the junk that’s larding up your sites so you can better meet the demand of users wanting fast-loading user experiences–no matter the device or connection.
Presented at WordCamp Salt Lake City 2013 (http://2013.slc.wordcamp.org/)
8. 8
MOBILE ONLY?
US: 25%
NEVER/INFREQUENT
DESKTOP USE
UK: 22%
NEVER/INFREQUENT
DESKTOP USE
Asia: 50+%
DON’T USE INTERNET ON PC
Africa: 50+%
DON’T USE INTERNET ON PC
India: 49%
NEVER/INFREQUENT
DESKTOP USE
US: 50+%
MORE MOBILE THAN PC
BY 2015
Source: http://www.lukew.com/ff/entry.asp?1391
KENYA: M-PESA
17% of GDP
54% of adults
24. Spring Cleaning
• Remove plugins and themes you don’t use
• Delete unattached images in Media Library
• Optimize the database
• Clean out old revisions
• Remove references to inactive plugins or
themes
• Plugin: WP Clean Up
29. • Are most site visitors new or returning?
• International or domestic?
• Using mobile browsers or desktop browsers?
• Which browser versions are they using?
Analytics
46. Poor Man’s CDN
• Add a subdomain to your site
• Change where your media files point
(Settings > Uploading Files)
• upload path to “/home/www/public_html/assets”
• upload_url_path to “http://assets.domain.com”
• Plugin: Upload Url and Path Enabler
47. Poor Man’s CDN caveats
• Only works when you have www subdomain
• Make sure it’s cookie-free
• wp-config: define("COOKIE_DOMAIN",
'www.domain.com');
• May also need to change Google Analytics
53. Move it to the bottom
<?php
//First remove all JS loaded in the head section
remove_action('wp_head', 'wp_print_scripts');
remove_action('wp_head', 'wp_print_head_scripts', 9);
remove_action('wp_head', 'wp_enqueue_scripts', 1);
//Load JS at the footer of the template
add_action('wp_footer', 'wp_print_scripts', 1);
add_action('wp_footer', 'wp_enqueue_scripts', 1);
add_action('wp_footer', 'wp_print_head_scripts', 1);?>
?>
61. Understand browsers
• cache size is smaller, meaning it can't store as
many files in memory
• maximum size of file that can be cached is
also smaller
• fewer parallel connections
• cell radio turns on and off