10 of the Weirdest Web Performance Tips

10 of the Weirdest Web Performance Tips

10 of the Weirdest Web Performance Tips: Set image width and height attributes; Compression can result in slower responses; File concatenation can make a site slower; Multiple domains may not improve performance; Use font repositories effectively; Avoid base64 encoding; Load ES6 code in the HTML <head>; Check the efficiency of ES5 transpilation; Caching CDN assets can be dangerous!; Is analytics harming site performance?

The average web page takes seven seconds to load on a desktop device and 20 seconds on mobile. It makes 70 HTTP requests and downloads more than 2MB of data including:

  • 20Kb of HTML
  • 60Kb of CSS over seven files
  • 430Kb of JavaScript in 20 files
  • 26 images totalling 900Kb

Source: httparchive.org Slow sites are bad for:

Users Downloading a single page on a mobile phone costs $0.29 in Canada, $0.19 in Japan, and $0.13 in the US. Those browsing in Vanuatu, Mauritania, or Madagascar pay more than 1% of their daily income.

Business Slow sites rank lower in search engines, incur higher hosting costs, are more difficult to maintain, and reduce conversion rates.

The environment The average page emits 1.76g of CO2 per view. A site with 10,000 monthly page views spews 211Kg of CO2 per year.

There is a simple solution to web performance: transmit less data and do less processing. The practicalities are more challenging. The following tips may be unconventional, controversial, counter-intuitive, or reverse previous advice. As always, the best result will depend on what you’re trying to achieve. Testing is imperative so tools such as Lighthouse and Asayer.io can help evaluate the impact of your changes.

  • Set image width and height attributes
  • Compression can result in slower responses
  • File concatenation can make a site slower
  • Multiple domains may not improve performance
  • Use font repositories effectively
  • Avoid base64 encoding
  • Load ES6 code in the HTML <head>
  • Check the efficiency of ES5 transpilation
  • Caching CDN assets can be dangerous!
  • Is analytics harming site performance?

web-development javascript html css

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Hire CSS Developer

Want to develop a website or re-design using CSS Development? We build a website and we implemented CSS successfully if you are planning to **[Hire CSS Developer](https://hourlydeveloper.io/hire-dedicated-css-developer/ "Hire CSS Developer")**...

Slideshow with HTML, CSS, and JavaScript / How to Create a Slideshow with HTML, CSS, and JavaScript

In this tutorial, we will build a Slideshow of the Social Media Icons with HTML, CSS, and JavaScript

Image slider in HTML, CSS and, JavaScript || Carousel in HTML, CSS, and, JavaScript

Create a simple and responsive image slider or carousel using HTML, CSS, and javaScript.

Build a Google Clone Search Engine Web App | HTML, CSS and JavaScript

We'll build a Google clone using HTML, SASS compiled to CSS, and Vanilla Javascript. The design will be mobile first, responsive, and have accessibility in mind. We'll use the Javascript Fetch API with Async / Await to retrieve search results from the Wikipedia API.

Calendar with HTML, CSS, and JavaScript - How to build calendar using HTML, CSS, and JavaScript

In this tutorial, we will build a Calendar with HTML, CSS, and JavaScript