Skip to content

Latest commit

 

History

History
157 lines (95 loc) · 2.42 KB

pagesize-slides.md

File metadata and controls

157 lines (95 loc) · 2.42 KB

Your web pages are too big

waiting for website

Hamish Downer @hgd20


why should you care?

why should I care


why should you care?

  • less developed countries
  • mobile internet
  • reduce bandwidth on usage server side
  • overloaded wifi ...
  • SPEED

Types of poor connection

  • slow

slow


Types of poor connection

  • slow
  • latency

latency


Types of poor connection

  • slow
  • latency
  • dropped packets

dropped


why should you care?

  • less developed countries
  • mobile internet
  • reduce bandwidth usage on server side
  • overloaded wifi ...
  • SPEED
  • and it's an easy win

Gzip compression on server

squash it

  • apache - mod_deflate
  • nginx - HttpGzipModule
  • Django - GZipMiddleware
  • mod_pagespeed from Google

Caching

The best work is no work

squash it

  • ConditionalGetMiddleware: etag, last-modified

HTML minification


CSS/JS minification

  • django-pipeline
  • django-compressor
  • webassets

jquery -> jquip


bootstrap CSS

squash it

  • don't hit "download", go to "customize" and download just what you need

images

  • At the least, do your image resizing on the server
  • easy-thumbnails will do this for you

image-diet

  • https://github.com/samastur/image-diet
  • PIL is great, but images are really not optimised
  • if you're using easy-thumbnails, it just works (tm)
  • saves 1/3 to 1/2 of file size while not visibly different

Tools for testing

  • Firebug net tab, Yslow
  • Loband Simulator
  • Mac: Network Link Conditioner (GUI), ipfw/dummynet
  • Linux: tc scripts
  • Windows: Fiddler, TMNetSim, Network Emulation in Visual Studio, Charles Proxy and others

Examples of low bandwidth sites


Thank you

https://github.com/foobacca/reduce-django-page-size

I am Hamish Downer, @hgd20 on twitter, work at Aptivate.

http://www.aptivate.org/