How to speed up a website is required to know for a good web developer.
If you don’t know how fast your site is,
You can check it at : https://developers.google.com/speed/pagespeed/insights/
Here are some of the many ways to increase your page speed:
- Minify JS & CSS
- Reduce Redirects
- Remove Rend-Blocking JS
- Compress Images
- Improve Server Response Time
- Use a CDN
1. Minify JS & CSS
By optimizing your code (including removing spaces, commas, and other unnecessary characters), you can dramatically increase your page speed.
You can use cssminifier.com and javascript-minifier.com.
2. Reduce Redirects
For example: if your mobile redirect pattern looks like this:
“example.com->www.example.com-> m.example.com->m.example.com/home”
each of those two additional redirects makes your page load slower.
3. Remove Rend-Blocking JS
Browsers have to build a DOM tree by parsing HTML before they can render a page. If your browser encounters a script during this process, it has to stop and execute it before it can continue.
4. Compress Images
Images make up on average 21% of a total webpage’s weight.
You can use tools like tinypng.com to compress your images.
5. Improve Server Response Time
It’s affected by the amount of traffic you receive, the resources each page uses, and the software your server uses.
To improve your server response time, look for performance bottlenecks like slow database queries, or slow routing and fix it.
6. Use a CDN
A Content Delivery Network is a highly distributed platform of servers that helps minimize delays in loading web page content by reducing the physical distance between the server and the user.