Responsive design (3)

Image srcset & sizes with Cloudflare Images

There are various ways to handle responsive images, one of the more time consuming ways is to add images using srcset and sizes. This method has the advantage that you then serve the right image size based on the device resolution. The downside is that you are…

Mobile device detection using PHP and USER-Agent

When designing responsive websites, the main focus is using the template framework which has been chosen for the site, eg bootstrap to create views for different devices. This works to a certain extent but also creates a lot of code bloat which may load unnecessarily.

A little known attribute for HTML image - decoding async

The HTML image tag has a hidden attribute called decoding. When the image tag loads, content below the image has to wait for the image to finish loading before the rest of the content is displayed. With the decoding attribute you have three options which allow…