On Github mauricio / faster-websites-presentation
It doesn't matter your customer in in a really fast connection, if you don't pay attention to how your data is served, it will still be and look slow.
Check how to do that to your server software
This means merging all JS and CSS files into just one of each
... make sure you're using the assets pipeline to serve JavaScript and CSS files
#navbar .nav-sprite { background-image: url("http://g-ecx.images-amazon.com/images-2x-v1.png"); background-size: 350px; background-position: -10px -340px; height: 26px; width: 46px; }
Page or static content that doesn't change often? You must include an Expires or Cache-Control header.
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { expires 30d; add_header Pragma public; add_header Cache-Control "public"; }
gzip on; gzip_http_version 1.1; gzip_vary on; gzip_comp_level 6; gzip_proxied any; gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js; gzip_buffers 16 8k; gzip_disable "MSIE [1-6]\.(?!.*SV1)";
Content delivery networks will have edge locations closer to your users and will provide faster results for your static assets. CloudFlare and Amazon CloudFront are great options.
Use pngcrush and jpegtran to remove useless stuff from your images.
Try to always serve content whenever a user requests a URL