SlideShare a Scribd company logo
1 of 31
WHO AM I?
@gregbenner
http://gregbenner.ca
http://za.linkedin.com/in/gregbenner
WHAT DO I DO?
Front End Development
-focusing on javascript, and jquery
-CSS3 and HTML5
-PHP and MYSQL
COOL, BUT WHAT DO YOU KNOW?
WHAT I WOULD LIKE TO COVER
• Why do we need to optimize a website?
• What’s an http request, and the real cost of one
• How do we check our website
• What these tools show us
• What is minifying, how does this help
• Images, and how to tame them
• Tools, best practices and choosing the right file type
• SVG’s and how to make use of them today
• Fonticons the newest craze
• GZIP, Deflate
• Command Line Tools
• Bonus: WordPress tips and tricks!
WHY??
People want to see what you’re sharing with them quickly.
- If they don’t they will leave quickly.
- They don’t want to pay to see your site, keep it low, keep their bills low.
- Google, and Bing will give you a higher index if your site is fast (SEO)
- Save yourself time and money. Going over your bandwidth will cost you
or crash you
- I can go on but I think you get the idea
WHAT’S AN HTTP REQUEST, AND THE REAL COST
HTTP Requests vs File Size?
http://stackoverflow.com/questions/9855545/http-requests-vs-file-size
The practical answer is never, especially when you're talking about relatively minuscule
amounts of data like a kilobyte or two.
The real enemy of a web page's performance is not the number of bytes transferred; rather, it
is network latency. Let's take your example and consider a 5 Mb/s connection (the
average connection speed in the US is a little over that) with a ping time to your server of
80ms:
1x 20 kB files: 80ms latency + 31ms transfer time = 111ms
2x 4 kB files: 160ms latency + 13ms transfer time = 173ms
This "optimization" just cost at least 62ms with all other variables being equal. In the real
world, I'd wager that performance would be even worse due to things like extra server
load.
INSPECTION TOOLS
PageSpeed https://developers.google.com/speed/docs/best-
practices/rules_intro
YSlow http://developer.yahoo.com/performance/rules.html
Pingdom http://tools.pingdom.com
Webkit Inspector:
WIN Ctrl + Shift + I OSX ⌥ + ⌘ + I
Or as a last resort right click anywhere then inspect element
Learn the DOM Tools for free in depth http://discover-
devtools.codeschool.com/
NETWORK PANEL
Latency, the time between making the request and the server's first
response, is shown in the lighter shade within each bar.
The blue and red vertical lines - on the right-hand side in the above
screenshot - indicate firing of the DOMContentLoadedand Load
events respectively.
WHAT IS MINIFYING, HOW DOES THIS HELP?
- Image files contains a lot of information that is useless on the Web. For
example, a
JPEG photo can have Exifmetadata from the camera (date, camera model,
location,
etc.)
- A PNG contains information about colors, metadata, and sometimes
even a
miniature
embedded thumbnail.
- To improve the User Experience you should use Progressive JPEGS, in
photoshop the
default is baseline. Baseline are a bit smaller but the way in which they load
is
perceived to be much, much slower.
SOME TOOLS TO HELP YOU OUT
Online:
• Smush it by Yahoo http://www.smushit.com/ysmush.it/ loseless
• Tiny PNG http://tinypng.org/ lossy
• Kraken http://kraken.io/ both
Desktop:
• ImageOptim (Mac)
• RIOT (Windows)
• ImageAlpha (Mac)
• JPEGMini (Mac, iOS, soon Windows)
Command Line tools covered later…
KRAKEN
Available as online with drag and drop or enter a url
Available as a browser plugin for one click page optimisation
LOSSY, or LOSELESS
SPRITING, IT’S A GOOD THING
A Sprite is the idea of taking many small images and combining them into
one big
One. This is a best practice in web design and the idea originates from
Arcade games
70’s (http://en.wikipedia.org/wiki/Sprite_(computer_graphics))
TOOLS TO HELP YOU OUT
http://www.spritecow.com/ online
http://spritepad.wearekiss.com/ online
http://www.codeandweb.com/texturepacker
http://compass-style.org/help/tutorials/spriting/ sass compass
INLINE IMAGES
• Another Nifty trick to add to your arsenal is data-uri images or base64 images.
They have decent support, IE8 is limited to 32kb but is easy enough to have a
fallback
for.
• They have the advantage of no http request, and even though they generally
are 30%
Larger than the equivalent raster image, they benefit greatly from GZIPPING on
the server.
• There are online tools to generate them, desktop tools, command line tools,
and plugins for your favorite text editors.
http://compass-style.org/reference/compass/helpers/inline-data/
http://dataurl.net/#dataurlmaker
https://github.com/tm-minty/sublime-text-2-image2base64
http://css-tricks.com/data-uris/
ANATOMY OF A FAST WEB PAGE
-As a general rule, styles in the <head> right at the top.
-One style sheet for the whole website (Personal philosophy) remember
those nasty
http requests from earlier
-JS at the bottom, so it doesn’t block page loading.-
- Exceptions being modernizer, or any script required to render the DOM
such as an IE shiv/shim
- Serve popular libraries from a Content Delivery Network such as
https://developers.google.com/speed/libraries/devguide#jquery or
http://cdnjs.com/
- Combine and minify all other scripts into one. (how to coming right up)
WHY MINIFY JS/CSS/HTML?
JPG,PNG, and GIF’s have already been compressed to a degree. But our
text based
files at this point are sitting there all bloated and full of whitespace.
JS/CSS/HTML/SVG/XML and anything else text based on the net can be
minified
which is the process of removing extra whitespace. This provides a
significant
reduction in bandwidth.
Some online tools:
http://www.willpeavy.com/minifier/
https://developers.google.com/closure/compiler/
http://yui.github.io/yuicompressor/
SVG’S THEY’RE VECTORIFIC!
Use svg’s they are sometimes a little larger in file size but they are crisp and look
great on retina displays or when a user is zoomed in. Plus SVG’s are text based
and
when served gzipped (as you should!) the file size is at least the same as an
equivalent raster image which doesn’t benefit from gzip compression.
Modernizer Trick:
if (!Modernizr.svg) {
$('img[src$=".svg"]').each(function()
{
$(this).attr('src', $(this).attr('src').replace('.svg', '.png'));
});
}
SVG TOOLS
http://benhowdle.im/svgeezy/
http://petercollingridge.appspot.com/svg_optimiser optimise!
https://code.google.com/p/svgmin/
SVGeezy
CONTENT DELIVERY NETWORKS
Content Delivery Networks, are a host that is in the cloud. They have
multiple
locations and based where the rwebpage is being requested try to provide
it from the
closest geographical location to minimize latency.
CDN’s also provide a firewall to block threats to your site and can be
cheaper to host
With. The downside is that there aren’t many stations in South Africa /
Africa so you
will not benefit from the reduced latency. If you cater for a world wide
audience they
are worth looking into
CDN PROVIDERS
Cloudflare (FREE)
MaxCDN
AmazonS3
ICONFONTS
One downside to SVG’s is browser support, here’s where iconfonts really
shine.
They are backwards compatible to IE7, work on mobile and maintain a
small size.
There are a plethora of ready made ones for download, including twitter
bootstrap
famous:
BUT WHY NOT ROLL YOUR OWN?
With the lovely ICOMoon service you can create or source SVG files upload
them and
Create a whole set for yourself, or even pick and choose from existing
fonticons.
GZIP
It’s like winzip for you server!
• Gzip is easily turned on with an .htaccess file place in your directory
root
• Gzip works well with text based files, but not images (it can add file
size)
• Gzip can also be turned on when using a CMS such as WordPress,
Joomla, or Drupal via the admin panel or plugins
Check out this GIST for an starter .HTACCESS
https://gist.github.com/mauryaratan/2627841
COMMAND LINE TOOLS
This is the next level of automation, I used to fear the command line but
now it’s easy
• The biggest advantage here is you can achieve all the same results
without any extra work
• Set these bad boys up, use one command and every time you save they
will go to work.
• They are mostly written in JavaScript running on a server called NodeJS
• There are also nifty Ruby tools that do similar tasks.
commandline tools for images:
• pngout
• jpegtran
• gifsicle
• imgopt
GRUNT JS
Grunt depends on NPM node package manager, an easy download:
http://nodejs.org/download/
YEOMAN –A MODERN WORKFLOW
- Grunt powers many other libraries such as Yeoman http://yeoman.io/
- Yeoman includes project scaffolding and package managment
GRUNT IS BASED ON PLUGINS
IMAGES: https://github.com/heldr/grunt-img optipng / jpegtran
SVG to ICON FONTS https://github.com/filamentgroup/grunticon svg
SVG OPTIMISATION https://github.com/sindresorhus/grunt-svgmin
CODEKIT
If you like a nice GUI, and automation this tools for you
OSX only 
BONUS: WORDPRESS!
Secret Panel: yoursite.com/wp-admin/options.php enable gzip here or use a
plugin
Automate your smushing, server side
TOTAL CACHE FTW
• Server cached static html
• Link to a CDN
• Minify js/css
• improved security
THANKS!
I will put these up on slideshare with all the links, watch my twitter
@gregbenner

More Related Content

What's hot

[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web Design[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web DesignChristopher Schmitt
 
Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8Derek Jacoby
 
When Will Drupal Die? (Keynote talk)
When Will Drupal Die? (Keynote talk)When Will Drupal Die? (Keynote talk)
When Will Drupal Die? (Keynote talk)chrisshattuck
 
CSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. ControlCSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. ControlChristian Heilmann
 
The Big Picture: Responsive Images in Action #devcon13
The Big Picture: Responsive Images in Action #devcon13The Big Picture: Responsive Images in Action #devcon13
The Big Picture: Responsive Images in Action #devcon13Matthias Lau
 
The Big Picture: Responsive Images in Action #scd14
The Big Picture: Responsive Images in Action #scd14The Big Picture: Responsive Images in Action #scd14
The Big Picture: Responsive Images in Action #scd14Matthias Lau
 
HTTP 2.0 - Web Unleashed 2015
HTTP 2.0 - Web Unleashed 2015HTTP 2.0 - Web Unleashed 2015
HTTP 2.0 - Web Unleashed 2015dmethvin
 
Get Hip with JHipster - Denver JUG 2015
Get Hip with JHipster - Denver JUG 2015Get Hip with JHipster - Denver JUG 2015
Get Hip with JHipster - Denver JUG 2015Matt Raible
 
Get Ahead with HTML5 on Moible
Get Ahead with HTML5 on MoibleGet Ahead with HTML5 on Moible
Get Ahead with HTML5 on Moiblemarkuskobler
 
Business of Front-end Web Development
Business of Front-end Web DevelopmentBusiness of Front-end Web Development
Business of Front-end Web DevelopmentRachel Andrew
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX DesignersAshlimarie
 
Weniger aus Bilder holen
Weniger aus Bilder holenWeniger aus Bilder holen
Weniger aus Bilder holenWalter Ebert
 
Voices that matter: High Performance Web Sites
Voices that matter: High Performance Web SitesVoices that matter: High Performance Web Sites
Voices that matter: High Performance Web SitesStoyan Stefanov
 
Mehr Performance für WordPress - WPFra
Mehr Performance für WordPress - WPFraMehr Performance für WordPress - WPFra
Mehr Performance für WordPress - WPFraWalter Ebert
 
AWS Community Day - Paul Kuliniewicz - CloudHSM: Frustration as a Service
 AWS Community Day - Paul Kuliniewicz - CloudHSM: Frustration as a Service  AWS Community Day - Paul Kuliniewicz - CloudHSM: Frustration as a Service
AWS Community Day - Paul Kuliniewicz - CloudHSM: Frustration as a Service AWS Chicago
 
Thats Not Flash?
Thats Not Flash?Thats Not Flash?
Thats Not Flash?Mike Wilcox
 

What's hot (20)

[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web Design[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web Design
 
HTML5
HTML5HTML5
HTML5
 
Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8
 
When Will Drupal Die? (Keynote talk)
When Will Drupal Die? (Keynote talk)When Will Drupal Die? (Keynote talk)
When Will Drupal Die? (Keynote talk)
 
CSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. ControlCSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. Control
 
The Big Picture: Responsive Images in Action #devcon13
The Big Picture: Responsive Images in Action #devcon13The Big Picture: Responsive Images in Action #devcon13
The Big Picture: Responsive Images in Action #devcon13
 
The Big Picture: Responsive Images in Action #scd14
The Big Picture: Responsive Images in Action #scd14The Big Picture: Responsive Images in Action #scd14
The Big Picture: Responsive Images in Action #scd14
 
HTTP 2.0 - Web Unleashed 2015
HTTP 2.0 - Web Unleashed 2015HTTP 2.0 - Web Unleashed 2015
HTTP 2.0 - Web Unleashed 2015
 
Get Hip with JHipster - Denver JUG 2015
Get Hip with JHipster - Denver JUG 2015Get Hip with JHipster - Denver JUG 2015
Get Hip with JHipster - Denver JUG 2015
 
Get Ahead with HTML5 on Moible
Get Ahead with HTML5 on MoibleGet Ahead with HTML5 on Moible
Get Ahead with HTML5 on Moible
 
Business of Front-end Web Development
Business of Front-end Web DevelopmentBusiness of Front-end Web Development
Business of Front-end Web Development
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
Weniger aus Bilder holen
Weniger aus Bilder holenWeniger aus Bilder holen
Weniger aus Bilder holen
 
Responsive and Fast
Responsive and FastResponsive and Fast
Responsive and Fast
 
Responsive Enhancement
Responsive EnhancementResponsive Enhancement
Responsive Enhancement
 
Voices that matter: High Performance Web Sites
Voices that matter: High Performance Web SitesVoices that matter: High Performance Web Sites
Voices that matter: High Performance Web Sites
 
Mehr Performance für WordPress - WPFra
Mehr Performance für WordPress - WPFraMehr Performance für WordPress - WPFra
Mehr Performance für WordPress - WPFra
 
AWS Community Day - Paul Kuliniewicz - CloudHSM: Frustration as a Service
 AWS Community Day - Paul Kuliniewicz - CloudHSM: Frustration as a Service  AWS Community Day - Paul Kuliniewicz - CloudHSM: Frustration as a Service
AWS Community Day - Paul Kuliniewicz - CloudHSM: Frustration as a Service
 
Thats Not Flash?
Thats Not Flash?Thats Not Flash?
Thats Not Flash?
 
[edUi] HTML5 Workshop
[edUi] HTML5 Workshop[edUi] HTML5 Workshop
[edUi] HTML5 Workshop
 

Viewers also liked

[Webinar] The 10 Ways You're Screwing Up Your Landing Page (And What To Do Ab...
[Webinar] The 10 Ways You're Screwing Up Your Landing Page (And What To Do Ab...[Webinar] The 10 Ways You're Screwing Up Your Landing Page (And What To Do Ab...
[Webinar] The 10 Ways You're Screwing Up Your Landing Page (And What To Do Ab...Unbounce
 
First Impressions & Landing Pages | Maximize Demosphere XXXIX
First Impressions & Landing Pages | Maximize Demosphere XXXIXFirst Impressions & Landing Pages | Maximize Demosphere XXXIX
First Impressions & Landing Pages | Maximize Demosphere XXXIXDemosphere International, Inc.
 
Landing Page Content Worksheet
Landing Page Content WorksheetLanding Page Content Worksheet
Landing Page Content WorksheetAngie Schottmuller
 
Teach meet apponomy
Teach meet apponomyTeach meet apponomy
Teach meet apponomydharvey100
 
Anatomy of a web page
Anatomy of a web pageAnatomy of a web page
Anatomy of a web pagedharvey100
 
Measurable content marketing
Measurable content marketing   Measurable content marketing
Measurable content marketing Jon M Bishop
 
You never get a second chance to make a first impression.
You never get a second chance to make a first impression.You never get a second chance to make a first impression.
You never get a second chance to make a first impression.Endeavor Management
 
The Ultimate Guide To Landing Page Optimization
The Ultimate Guide To Landing Page OptimizationThe Ultimate Guide To Landing Page Optimization
The Ultimate Guide To Landing Page OptimizationKumaran Balachandran
 
How to Control Your First Impression Online
How to Control Your First Impression OnlineHow to Control Your First Impression Online
How to Control Your First Impression OnlineBrandYourself.com
 
Website anatomy - What makes a good website?
Website anatomy - What makes a good website?Website anatomy - What makes a good website?
Website anatomy - What makes a good website?Zakery Kates
 
First Impressions Matter: LeanUX Design of Landing Page #1
First Impressions Matter: LeanUX Design of Landing Page #1First Impressions Matter: LeanUX Design of Landing Page #1
First Impressions Matter: LeanUX Design of Landing Page #1Kazumichi (Mario) Sakata
 
The Anatomy of the Perfect Landing Page
The Anatomy of the Perfect Landing PageThe Anatomy of the Perfect Landing Page
The Anatomy of the Perfect Landing Pagei-SCOOP
 
The First Impression Is The Last Impression: 25 Article Headers Proven to Boo...
The First Impression Is The Last Impression: 25 Article Headers Proven to Boo...The First Impression Is The Last Impression: 25 Article Headers Proven to Boo...
The First Impression Is The Last Impression: 25 Article Headers Proven to Boo...Wishpond
 
First Impression Rehab: Design Physiology Tips to Boost Conversion
First Impression Rehab: Design Physiology Tips to Boost ConversionFirst Impression Rehab: Design Physiology Tips to Boost Conversion
First Impression Rehab: Design Physiology Tips to Boost ConversionAngie Schottmuller
 

Viewers also liked (15)

[Webinar] The 10 Ways You're Screwing Up Your Landing Page (And What To Do Ab...
[Webinar] The 10 Ways You're Screwing Up Your Landing Page (And What To Do Ab...[Webinar] The 10 Ways You're Screwing Up Your Landing Page (And What To Do Ab...
[Webinar] The 10 Ways You're Screwing Up Your Landing Page (And What To Do Ab...
 
First Impressions & Landing Pages | Maximize Demosphere XXXIX
First Impressions & Landing Pages | Maximize Demosphere XXXIXFirst Impressions & Landing Pages | Maximize Demosphere XXXIX
First Impressions & Landing Pages | Maximize Demosphere XXXIX
 
Landing Page Content Worksheet
Landing Page Content WorksheetLanding Page Content Worksheet
Landing Page Content Worksheet
 
Teach meet apponomy
Teach meet apponomyTeach meet apponomy
Teach meet apponomy
 
Anatomy of a web page
Anatomy of a web pageAnatomy of a web page
Anatomy of a web page
 
Measurable content marketing
Measurable content marketing   Measurable content marketing
Measurable content marketing
 
You never get a second chance to make a first impression.
You never get a second chance to make a first impression.You never get a second chance to make a first impression.
You never get a second chance to make a first impression.
 
The Ultimate Guide To Landing Page Optimization
The Ultimate Guide To Landing Page OptimizationThe Ultimate Guide To Landing Page Optimization
The Ultimate Guide To Landing Page Optimization
 
How to Optimize Landing Pages for Conversions
How to Optimize Landing Pages for ConversionsHow to Optimize Landing Pages for Conversions
How to Optimize Landing Pages for Conversions
 
How to Control Your First Impression Online
How to Control Your First Impression OnlineHow to Control Your First Impression Online
How to Control Your First Impression Online
 
Website anatomy - What makes a good website?
Website anatomy - What makes a good website?Website anatomy - What makes a good website?
Website anatomy - What makes a good website?
 
First Impressions Matter: LeanUX Design of Landing Page #1
First Impressions Matter: LeanUX Design of Landing Page #1First Impressions Matter: LeanUX Design of Landing Page #1
First Impressions Matter: LeanUX Design of Landing Page #1
 
The Anatomy of the Perfect Landing Page
The Anatomy of the Perfect Landing PageThe Anatomy of the Perfect Landing Page
The Anatomy of the Perfect Landing Page
 
The First Impression Is The Last Impression: 25 Article Headers Proven to Boo...
The First Impression Is The Last Impression: 25 Article Headers Proven to Boo...The First Impression Is The Last Impression: 25 Article Headers Proven to Boo...
The First Impression Is The Last Impression: 25 Article Headers Proven to Boo...
 
First Impression Rehab: Design Physiology Tips to Boost Conversion
First Impression Rehab: Design Physiology Tips to Boost ConversionFirst Impression Rehab: Design Physiology Tips to Boost Conversion
First Impression Rehab: Design Physiology Tips to Boost Conversion
 

Similar to Web Optimisation

Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesVitaly Friedman
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalabilityTwinbit
 
Performance as UX with Justin Howlett
Performance as UX with Justin HowlettPerformance as UX with Justin Howlett
Performance as UX with Justin HowlettFITC
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonNeotys
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingAshok Modi
 
The Superhero’s Method of Modern HTML5 Development by RapidValue Solutions
The Superhero’s Method of Modern HTML5 Development by RapidValue SolutionsThe Superhero’s Method of Modern HTML5 Development by RapidValue Solutions
The Superhero’s Method of Modern HTML5 Development by RapidValue SolutionsRapidValue
 
The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013Bastian Grimm
 
Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Brian Moon
 
implement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflowimplement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflowWordPress
 
Academy PRO: HTML5 API graphics
Academy PRO: HTML5 API graphicsAcademy PRO: HTML5 API graphics
Academy PRO: HTML5 API graphicsBinary Studio
 
From HTML to pixels on the Screen
From HTML to pixels on the ScreenFrom HTML to pixels on the Screen
From HTML to pixels on the ScreenIgor Talic
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeededm00se
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuningJohn McCaffrey
 
Web Performance Madness - brightonSEO 2018
Web Performance Madness - brightonSEO 2018Web Performance Madness - brightonSEO 2018
Web Performance Madness - brightonSEO 2018Bastian Grimm
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal PerformancesVladimir Ilic
 
PrairieDevCon 2014 - Web Doesn't Mean Slow
PrairieDevCon 2014 -  Web Doesn't Mean SlowPrairieDevCon 2014 -  Web Doesn't Mean Slow
PrairieDevCon 2014 - Web Doesn't Mean Slowdmethvin
 
Developing High Performance Web Apps
Developing High Performance Web AppsDeveloping High Performance Web Apps
Developing High Performance Web AppsTimothy Fisher
 
Super speed around the globe - SearchLeeds 2018
Super speed around the globe - SearchLeeds 2018Super speed around the globe - SearchLeeds 2018
Super speed around the globe - SearchLeeds 2018Bastian Grimm
 

Similar to Web Optimisation (20)

Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
 
Performance as UX with Justin Howlett
Performance as UX with Justin HowlettPerformance as UX with Justin Howlett
Performance as UX with Justin Howlett
 
performance.ppt
performance.pptperformance.ppt
performance.ppt
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark Tomlinson
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
 
The Superhero’s Method of Modern HTML5 Development by RapidValue Solutions
The Superhero’s Method of Modern HTML5 Development by RapidValue SolutionsThe Superhero’s Method of Modern HTML5 Development by RapidValue Solutions
The Superhero’s Method of Modern HTML5 Development by RapidValue Solutions
 
The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013
 
Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Ease into HTML5 and CSS3
Ease into HTML5 and CSS3
 
implement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflowimplement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflow
 
Academy PRO: HTML5 API graphics
Academy PRO: HTML5 API graphicsAcademy PRO: HTML5 API graphics
Academy PRO: HTML5 API graphics
 
From HTML to pixels on the Screen
From HTML to pixels on the ScreenFrom HTML to pixels on the Screen
From HTML to pixels on the Screen
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
Web Performance Madness - brightonSEO 2018
Web Performance Madness - brightonSEO 2018Web Performance Madness - brightonSEO 2018
Web Performance Madness - brightonSEO 2018
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal Performances
 
PrairieDevCon 2014 - Web Doesn't Mean Slow
PrairieDevCon 2014 -  Web Doesn't Mean SlowPrairieDevCon 2014 -  Web Doesn't Mean Slow
PrairieDevCon 2014 - Web Doesn't Mean Slow
 
Developing High Performance Web Apps
Developing High Performance Web AppsDeveloping High Performance Web Apps
Developing High Performance Web Apps
 
Super speed around the globe - SearchLeeds 2018
Super speed around the globe - SearchLeeds 2018Super speed around the globe - SearchLeeds 2018
Super speed around the globe - SearchLeeds 2018
 

Recently uploaded

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Recently uploaded (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

Web Optimisation

  • 1.
  • 2. WHO AM I? @gregbenner http://gregbenner.ca http://za.linkedin.com/in/gregbenner WHAT DO I DO? Front End Development -focusing on javascript, and jquery -CSS3 and HTML5 -PHP and MYSQL
  • 3. COOL, BUT WHAT DO YOU KNOW?
  • 4. WHAT I WOULD LIKE TO COVER • Why do we need to optimize a website? • What’s an http request, and the real cost of one • How do we check our website • What these tools show us • What is minifying, how does this help • Images, and how to tame them • Tools, best practices and choosing the right file type • SVG’s and how to make use of them today • Fonticons the newest craze • GZIP, Deflate • Command Line Tools • Bonus: WordPress tips and tricks!
  • 5. WHY?? People want to see what you’re sharing with them quickly. - If they don’t they will leave quickly. - They don’t want to pay to see your site, keep it low, keep their bills low. - Google, and Bing will give you a higher index if your site is fast (SEO) - Save yourself time and money. Going over your bandwidth will cost you or crash you - I can go on but I think you get the idea
  • 6. WHAT’S AN HTTP REQUEST, AND THE REAL COST HTTP Requests vs File Size? http://stackoverflow.com/questions/9855545/http-requests-vs-file-size The practical answer is never, especially when you're talking about relatively minuscule amounts of data like a kilobyte or two. The real enemy of a web page's performance is not the number of bytes transferred; rather, it is network latency. Let's take your example and consider a 5 Mb/s connection (the average connection speed in the US is a little over that) with a ping time to your server of 80ms: 1x 20 kB files: 80ms latency + 31ms transfer time = 111ms 2x 4 kB files: 160ms latency + 13ms transfer time = 173ms This "optimization" just cost at least 62ms with all other variables being equal. In the real world, I'd wager that performance would be even worse due to things like extra server load.
  • 7. INSPECTION TOOLS PageSpeed https://developers.google.com/speed/docs/best- practices/rules_intro YSlow http://developer.yahoo.com/performance/rules.html Pingdom http://tools.pingdom.com Webkit Inspector: WIN Ctrl + Shift + I OSX ⌥ + ⌘ + I Or as a last resort right click anywhere then inspect element Learn the DOM Tools for free in depth http://discover- devtools.codeschool.com/
  • 8. NETWORK PANEL Latency, the time between making the request and the server's first response, is shown in the lighter shade within each bar. The blue and red vertical lines - on the right-hand side in the above screenshot - indicate firing of the DOMContentLoadedand Load events respectively.
  • 9. WHAT IS MINIFYING, HOW DOES THIS HELP? - Image files contains a lot of information that is useless on the Web. For example, a JPEG photo can have Exifmetadata from the camera (date, camera model, location, etc.) - A PNG contains information about colors, metadata, and sometimes even a miniature embedded thumbnail. - To improve the User Experience you should use Progressive JPEGS, in photoshop the default is baseline. Baseline are a bit smaller but the way in which they load is perceived to be much, much slower.
  • 10. SOME TOOLS TO HELP YOU OUT Online: • Smush it by Yahoo http://www.smushit.com/ysmush.it/ loseless • Tiny PNG http://tinypng.org/ lossy • Kraken http://kraken.io/ both Desktop: • ImageOptim (Mac) • RIOT (Windows) • ImageAlpha (Mac) • JPEGMini (Mac, iOS, soon Windows) Command Line tools covered later…
  • 11. KRAKEN Available as online with drag and drop or enter a url Available as a browser plugin for one click page optimisation LOSSY, or LOSELESS
  • 12. SPRITING, IT’S A GOOD THING A Sprite is the idea of taking many small images and combining them into one big One. This is a best practice in web design and the idea originates from Arcade games 70’s (http://en.wikipedia.org/wiki/Sprite_(computer_graphics))
  • 13. TOOLS TO HELP YOU OUT http://www.spritecow.com/ online http://spritepad.wearekiss.com/ online http://www.codeandweb.com/texturepacker http://compass-style.org/help/tutorials/spriting/ sass compass
  • 14. INLINE IMAGES • Another Nifty trick to add to your arsenal is data-uri images or base64 images. They have decent support, IE8 is limited to 32kb but is easy enough to have a fallback for. • They have the advantage of no http request, and even though they generally are 30% Larger than the equivalent raster image, they benefit greatly from GZIPPING on the server. • There are online tools to generate them, desktop tools, command line tools, and plugins for your favorite text editors. http://compass-style.org/reference/compass/helpers/inline-data/ http://dataurl.net/#dataurlmaker https://github.com/tm-minty/sublime-text-2-image2base64 http://css-tricks.com/data-uris/
  • 15. ANATOMY OF A FAST WEB PAGE -As a general rule, styles in the <head> right at the top. -One style sheet for the whole website (Personal philosophy) remember those nasty http requests from earlier -JS at the bottom, so it doesn’t block page loading.- - Exceptions being modernizer, or any script required to render the DOM such as an IE shiv/shim - Serve popular libraries from a Content Delivery Network such as https://developers.google.com/speed/libraries/devguide#jquery or http://cdnjs.com/ - Combine and minify all other scripts into one. (how to coming right up)
  • 16. WHY MINIFY JS/CSS/HTML? JPG,PNG, and GIF’s have already been compressed to a degree. But our text based files at this point are sitting there all bloated and full of whitespace. JS/CSS/HTML/SVG/XML and anything else text based on the net can be minified which is the process of removing extra whitespace. This provides a significant reduction in bandwidth. Some online tools: http://www.willpeavy.com/minifier/ https://developers.google.com/closure/compiler/ http://yui.github.io/yuicompressor/
  • 17. SVG’S THEY’RE VECTORIFIC! Use svg’s they are sometimes a little larger in file size but they are crisp and look great on retina displays or when a user is zoomed in. Plus SVG’s are text based and when served gzipped (as you should!) the file size is at least the same as an equivalent raster image which doesn’t benefit from gzip compression. Modernizer Trick: if (!Modernizr.svg) { $('img[src$=".svg"]').each(function() { $(this).attr('src', $(this).attr('src').replace('.svg', '.png')); }); }
  • 19. CONTENT DELIVERY NETWORKS Content Delivery Networks, are a host that is in the cloud. They have multiple locations and based where the rwebpage is being requested try to provide it from the closest geographical location to minimize latency. CDN’s also provide a firewall to block threats to your site and can be cheaper to host With. The downside is that there aren’t many stations in South Africa / Africa so you will not benefit from the reduced latency. If you cater for a world wide audience they are worth looking into
  • 21. ICONFONTS One downside to SVG’s is browser support, here’s where iconfonts really shine. They are backwards compatible to IE7, work on mobile and maintain a small size. There are a plethora of ready made ones for download, including twitter bootstrap famous:
  • 22. BUT WHY NOT ROLL YOUR OWN? With the lovely ICOMoon service you can create or source SVG files upload them and Create a whole set for yourself, or even pick and choose from existing fonticons.
  • 23. GZIP It’s like winzip for you server! • Gzip is easily turned on with an .htaccess file place in your directory root • Gzip works well with text based files, but not images (it can add file size) • Gzip can also be turned on when using a CMS such as WordPress, Joomla, or Drupal via the admin panel or plugins Check out this GIST for an starter .HTACCESS https://gist.github.com/mauryaratan/2627841
  • 24. COMMAND LINE TOOLS This is the next level of automation, I used to fear the command line but now it’s easy • The biggest advantage here is you can achieve all the same results without any extra work • Set these bad boys up, use one command and every time you save they will go to work. • They are mostly written in JavaScript running on a server called NodeJS • There are also nifty Ruby tools that do similar tasks. commandline tools for images: • pngout • jpegtran • gifsicle • imgopt
  • 25. GRUNT JS Grunt depends on NPM node package manager, an easy download: http://nodejs.org/download/
  • 26. YEOMAN –A MODERN WORKFLOW - Grunt powers many other libraries such as Yeoman http://yeoman.io/ - Yeoman includes project scaffolding and package managment
  • 27. GRUNT IS BASED ON PLUGINS IMAGES: https://github.com/heldr/grunt-img optipng / jpegtran SVG to ICON FONTS https://github.com/filamentgroup/grunticon svg SVG OPTIMISATION https://github.com/sindresorhus/grunt-svgmin
  • 28. CODEKIT If you like a nice GUI, and automation this tools for you OSX only 
  • 29. BONUS: WORDPRESS! Secret Panel: yoursite.com/wp-admin/options.php enable gzip here or use a plugin Automate your smushing, server side
  • 30. TOTAL CACHE FTW • Server cached static html • Link to a CDN • Minify js/css • improved security
  • 31. THANKS! I will put these up on slideshare with all the links, watch my twitter @gregbenner