There are various techniques to boost your website speed either in CMS like WordPress or Statis website.
Like:
- Reducing # of HTTP requests
- Reducing DOM complexity
- Image Optimization, JS & CSS optimization
- Managing the order of loading resources
- Server optimization and backend rendering optimization
HTTP/1 is an old way to send requests. HTTP/2 is an advanced way to send requests as it sends many requests as one call. So best practice to use HTTP/2.
Image optimization
There are various image formats like PNG, JPEG, SVG, GIF, and Webp. Use Webp for the best outcome. But you can use anyone as per demand.
Also to optimize images use a single image as a combination of many images and use that in many places by setting up the position attribute of CSS. But it will be used in the case of social media icons etc.
<picture> tag is an HTML5 tag and it is a way to instruct the browser to choose an image in a given order while <srcset => is a way to tell the browser that you can use a best-fit image that you think is best to serve. So in srcset, the browser has the freedom to choose an image from provided the sizes of images.
![](https://dilip-parmar.in/wp-content/uploads/2023/12/Image-optimization-1024x690.jpeg)