Reduce your server response time

Contributors

@paul-boag


Business Benefits

Reduce your bounce rate and improve search rankings.


Use a measurement tool like GTMetrix or Google PageSpeed Insights to check your current server response time (SRT).

Enter your URL. You will see an overall score for page load time, which also includes SRT data.

Open the Waterfall Chart and see every element in the order it loaded. Identify and debug problem areas by looking for requests that are slowing down your site.

Hover over an item in the Waterfall chart to see detailed information about a request. Pay especial attention to the Waiting time.

Click on the Timings tab to view other relevant metrics like TTFB. You might need to create a free account to access this.

If you’re using PSI, enter your URL, and you’ll see an overall score and some useful metrics.

The most applicable metrics are:

  • First Contentful Paint: The time from when the page starts loading to when any part of the page’s content is rendered on screen.
  • Cumulative Layout Shift: The sum total of all individual layout shift scores for every unexpected layout shift that occurs during the entire lifespan of the page.
  • Time to Interactive: How long it takes a page to become fully interactive. According to Google, a page is fully interactive when the page displays useful content, event handlers are registered for most visible page elements, and the page responds to user interactions with 50 milliseconds.
  • Total Blocking time: The total amount of time between FCP and TTI where the main thread was blocked for long enough to prevent input responsiveness.

For example, if your SRT is slower than 200 milliseconds, you will receive a notification under the Opportunities section suggesting you reduce SRT.

Reduce server response time.

.

Work with your your development team to find and fix technical issues that slow your SRT.

Potential factors that may slow down the response of your server can be:

  • Slow application logic: Use a code profiling tool to help determine which dependencies are being used on your site and how long each of those dependencies takes to load.
  • Slow database queries: These occur when your database queries are not firing efficiently. You may not even know they are performing poorly unless you check underneath the hood. Slow database queries require more work and use more CPU resources.
  • Slow routing: You want to place your most visited pages and content at the top of the routing queue to make those locations a high priority. You can also add more routes to any specific location if things are running slowly.
  • Resource CPU starvation: Running too many plugins or scripts on your site can lead to resource CPU starvation. Work with your team to uninstall resource intensive plugins that are not often being used and remove unnecessary scripts.

Use speed check and comparison tools to measure SRT, so you can choose the right hosting provider and server.

Read reviews and ask for recommendations before choosing a shared hosting provider as some providers overload their servers, which slows your SRT. Check the SRT for sites using the shared hosting provider you are thinking of choosing by using GTMetrix or PSI. Check a provider’s server speeds before you buy, using a speed check tool like Pickuphost’s free speed check tool.

Use a comparison tool like Invigital to compare hosting providers across metrics like average response time.

Use Bitcatcha to compare hosting speeds in a variety of locations across the world, so you can choose the one that is best for where you are. Choose a host with servers geographically close to your target audience.

Pick dedicated hosting if your budget can accommodate it. Dedicated hosting means that you do not share the server with another site.

Use a CDN to serve content to users from geographically closer servers.

A content delivery network (CDN) is a group of geographically distributed servers that work together to deliver online content faster. A CDN stores a cached version of your website in multiple locations all over the world. Each area has its own server, and the closest server to the user’s location will deliver the requested content.

CDN map.

Visual of how content delivery networks operate.

Choose a CDN and register your site based on anticipated traffic volume, the main types of media you serve, and your budget. Then, enable your CDN on your website either through your C-panel or using a plugin, depending on your hosting provider and content management system (CMS).

Update your DNS name server records to point your domain to your CDN’s servers if you purchased your domain from a different provider than the one you are using to host your site.

Optimize your images by choosing the right file type, slightly reducing image quality, and using a plugin to reduce file sizes.

Choose the right file format for your image. In general, a PNG will take up more space relative to a JPEG file. Use PNG for simple graphics such as logos and charts, and JPEG format for everything else. For example, you can use default JPEG format at 60% and experiment to find the right balance between image quality and file size. Optimize images before you upload them using Jpeg.io and Compressor. If you’re using WordPress, the Smush, or Kraken.io, plugins will optimize your images as you upload them.

Use browser caching to provide a better experience for returning visitors.

Caching is temporary storage that remembers JavaScript files, images, the HTML document, and more so that the content can be retrieved faster the next time the user visits. Enable caching by adding a small piece of code to your website’s .htaccess file. You can do this through the file manager within your hosting user area. This code tells your users’ browsers what to cache and how long to recall it for.

You can change the code to cache different aspects of your site for different amounts of time. For file types that are updated more frequently, set a shorter caching time. Alternatively, for some CMS platforms you can use a plugin to enable caching without any coding. Some of the most popular and highly rated include W3 Total Cache, WP Rocket for WordPress, and SpeedCache for Joomla.

Update your CMS, plugins, and website themes.

Outdated versions of your CMS, plugins, and website themes can reduce page speed significantly and leave your website vulnerable to security breaches. Run a quick audit of everything you have downloaded and installed regularly. You can ask yourself, when was the last time you cleared out your saved plugins and themes? And how often do you see those notifications reminding you to update your CMS, plugins, or website theme?

Last edited by @hesh_fekry 2023-11-14T11:10:39Z