How can developers get their websites to load faster? We talk about it with Shantanu, the guy behind Visionvpro.
Improving website performance is crucial for attracting traffic to a site and keeping website visitors engaged.
Test website performance
Website speed evaluations evaluate how a website is performing. Testing a site regularly can help developers monitor performance downgrades or improvements. A speed test also needs to help programmers identify some or all the areas slowing website functionality, and in which the areas for improvement are.
There are loads of high-quality site speed tests for quantifying performance, a number of them free. WebPageTest.org (which partners with Cloudflare) has several free tests and produces detailed breakdowns of how quickly individual elements of a page load. WebPageTest.org also allows programmers to test sites for different devices and network connection rates.
Google Chrome DevTools can also help developers in assessing their website's performance; the Network tab shows all HTTP requests, just how large the requested assets are, and how long asks take before they're fulfilled.
CDNs boost the speed of websites by caching content in numerous locations around the globe. CDN caching servers are generally located closer to end users than the server, or origin server. Requests for content visit a CDN server instead of all the way into the hosting server, which might be tens of thousands of miles and across multiple autonomous networks from the consumer. Employing a CDN can result in a massive decline in page loading times.
Images include a large proportion of Internet traffic, and they often take the longest to load a site since image files are normally larger in size compared to HTML and CSS files. Luckily, image load time can be lowered via picture optimization. Optimizing images generally entails reducing the resolution, compressing the documents, and reducing their size, and many picture optimizers and picture compressors can be found for free online.
Reduce the Amount of HTTP requests if possible
Most webpages will need browsers to earn multiple HTTP requests for various assets on the page, including graphics, scripts, and CSS files. In fact many webpages will need dozens of those requests. Each request results in a round trip to and from the server hosting the resource, which may increase the overall load time to get a page. Furthermore, with tools loaded from many distinct providers, a issue with one of the hosts could affect the webpage's ability to load quickly, or whatsoever.
Due to these potential problems, the entire quantity of assets each page needs to load should be kept to a minimum. As an example, if pictures are causing a page to load slowly, developers may look to get a faster image hosting solution (such as a CDN).
Use browser HTTP caching
The browser cache is a temporary storage place where browsers save copies of files that are inactive so they can load lately visited webpages much more quickly, instead of needing to ask the same content over and over. Developers can teach browsers to cache components of a page which won't change often. This greatly lowers the number of data the server should move to the browser, shortening load times for users that often visit specific pages.
Minimize the addition of external scripts
Any scripted webpage elements that are loaded from somewhere else, like external linking systems, CTA buttons, or lead-generation popups, need to be loaded each time a page loads. Depending on how big the script, these may slow a webpage down, or cause the webpage to never load at once (this is called'content leaping' or'design shifting' and can be especially frustrating for mobile users).
Don't use redirects, if potential
A redirect is when visitors to one webpage get forwarded to a different page instead. When constructing a performance-optimized site, every second counts. Redirects are sometimes inevitable, but they should not be used if not necessary.