Acabo de leer el —brevísimo— libro Web Page Size, Speed, and Performance, escrito por Terrence Dorsey y publicado por O’Reilly (la descarga es gratuíta).
El contenido del libro, como podrás imaginar, consta de consejos para mejorar el peso y rendimiento de una página web. Y creo que cada vez hay que valorar más aspectos como el peso y el rendimiento, teniendo en cuenta la tendencia actual. Cualquier «doctor web» nos diría hay un evidente sobrepeso.
Se puede encontrar una cita cuyo origen está en el mundo de la automoción, aplicable perfectamente al desarrollo web:
Simplify, then add lightness.
Sugerencia: puedes aprovechar para procasti…, digo, para ampliar tus bastos conocimientos leyendo un poco sobre Collin Chapman y la empresa de coches que fundó, Lotus.
Continuando, si es que se puede, en el libro aparecía un colofón con unos cuantos consejos, que cito a continuación:
- Start by measuring the size, request latency, and load time of your current site on various devices. You can do this right in the browser.
- Use online tools to measure more advanced site performance metrics and compare them against industry average.
- Know how long your page takes to finish rendering and what the time is to the first interaction. This is your first-impression metric.
- Evaluate your business goals and try to correlate site performance with traffic, conversiones, revenues, or whatever metrics is relevant to your business.
- Count all of the components that have to be requested to render your page Can you reduce this number?
- Slim down your HTML. Combine and minfiy your CSS files.
- Take a close look at where you reference scripts and when they excecute. Are scripts blocking page rendering or interaction?
- Make sure you’re using images wisely and optimizing them for size and quality. A little bit of code can make sure you’re not sending too many image bytes where they’re not needed.
- Don’t throw out social features just because they add to your request, scripts, and page size if they benefit the business; just be sure to use them tactically instead of spreading them all over the place.
- Starting with a focus on the mobile experience —most likely your fastest growing customer experience— may help you target performance optimizations that benefit all visitors to your site, even those using the desktop.