
By Mehdi Daoudi | Article Rating: |
|
September 30, 2017 10:00 AM EDT | Reads: |
2,894 |
Web Performance 101 - Redirects
By Kameerath Kareem
Websites are no longer just simple HTML pages with static content—they’ve evolved into a dynamic interface with features and content that are updated regularly. Website administrators use different techniques to ensure the user is viewing the latest version of the page or content. When new features are being added to the site, or a webpage resource has been moved to a new location, you don’t want the users to have access these pages. Preventing access can be done with the use of webpage redirects. Incoming HTTP requests can be redirected to another location on the site so the user experience is seamless. Webpage redirects can be used to:
- Redirect users to the mobile version of the site
- Redirect users to secured pages
- Redirect users to the latest version of the resource/content
- Redirect users to pages specific to their geo location
- Redirecting canonical URLs
Types of Redirects
There are two main categories of redirects: server-side and client-side. A server-side redirect uses HTTP code to specify the status of the webpage, which enables the server to redirect the user to the valid URL. The common server-side redirects are explained below.
301 – Moved Permanently: When an HTTP request returns a 301 status code, it informs the browser that the requested resource has been permanently moved to a new location and provides the address of the new location. It is usually used when there is a domain change, or to redirect old or non-existent pages to new URLs.
302 – Found: These are temporary redirects that are used when a resource needs to be temporarily served from a different location. For example, if you are making changes to certain pages on your site and don’t want the users to access these pages, then you will need to set up redirects to forward the user to a different page.
307 – Moved Temporarily: These function the same way as a 302 and is used when a page needs to be redirected temporarily, but 302 is only set up when the incoming request is either the HEAD or GET method; in all other instances of a temporary redirect, 307 is the recommended HTTP redirect.
304 – Not Modified: The status code 304 specifies whether the requested resource has been modified since it was last requested. It then redirects the request to fetch the content from cache instead of the server.
Client-side redirects involve the use of meta-refresh or JavaScript to redirect to another URL or to refresh the same page.
Performance Impact of Redirects
Each redirect on a page adds latency to the overall page load time. Too many redirects translate to higher page overhead and this delays the page load. When a user enters a domain into the browser and hits enter, the DNS resolution process is triggered and the domain is resolved to its corresponding IP address in a few milliseconds. If the landing page has another redirect, then the browser repeats the entire DNS resolution process once again to guide the user to the correct webpage. The multiple redirect requests are taxing on the browser resources and slow down the page load.
Webpage load time is also affected by internal redirects; for example, if the page tries to load content from a URL that has been redirected to newer or updated content, then the browser must create additional requests to fetch the valid content. These redirects result in additional round trips between the browser and the web server which pushes the load time higher; the perceived performance is degraded every time the browser encounters a redundant redirect.
Common Redirect Errors
Redirects are usually implemented to optimize SEO, to maintain page ranking and to improve user experience by redirecting users away from outdated pages and serving fresh content. If the redirects are not implemented correctly, it can cause various performance issues that can have a negative impact on the user’s digital experience. Here are some issues caused by redirects:
- Multiple redirects: The higher the number of redirects on a page, the higher is its page load time. Superficially, adding redirects my not seem like a major roadblock for performance; it is implemented mainly to improve SEO and provide a fluid user experience. The issues surface when there are too many redirects in the page structure. Multiple redirects are a huge overhead to the website and can slow it down significantly.
Consider the data below—the website has 160 objects on the page, out of which 46 are redirects, and this inevitably slows down the site. The page takes almost 13 seconds to fully load.
- Invalid redirects: There are often instances where the website administrator sets up bulk redirects without verifying the validity of the redirects, the site may also have old redirects that were never cleaned up. This can cause several issues on the site like broken links and 404s.
- Redirect loop: When there are several redirects on the page that are linked to each other, it creates a chain of redirects which may loop back to the same URL that initiated the redirect. This results in a redirect loop error, like the one displayed below, and the user will not be able to access the site.
Implementing Redirects the Right Way
To ensure user experience is not negatively affected by the redirects on your website, ensure you follow the best practices while implementing them. Here are some points to consider:
- Avoid redundant redirects: It’s recommended to avoid redirects where possible and to use this method only when absolutely needed. This will cut down unnecessary overhead and improve the perceived performance of the page.
- Chain redirects: When a URL is linked to another URL, this creates a chained redirect. Each URL added to the chain adds latency to the page. Chained redirects have a negative impact not only on page speed, but also SEO.
- Clean-up redirects: You may have hundreds of redirects on your website and it could be one of the main factors affecting page speed. Old redirects may conflict with new URLs, or backlinks may cause odd errors on the page. It is recommended to verify all the redirects you have set up and to remove the ones that are no longer needed. Retain the old links that have major referral traffic, while those that are rarely accessed can be removed. This exercise will help improve page speed significantly.
It’s best to minimize the use of redirects; if it is an indispensable part of your SEO strategy, then check the existing redirects before adding new ones, and delete those that are no longer needed. Regularly tracking and maintaining existing redirects on your website should be an important part of site optimization.
The post Web Performance 101 – Redirects appeared first on Catchpoint's Blog - Web Performance Monitoring.
Published September 30, 2017 Reads 2,894
Copyright © 2017 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Mehdi Daoudi
Catchpoint radically transforms the way businesses manage, monitor, and test the performance of online applications. Truly understand and improve user experience with clear visibility into complex, distributed online systems.
Founded in 2008 by four DoubleClick / Google executives with a passion for speed, reliability and overall better online experiences, Catchpoint has now become the most innovative provider of web performance testing and monitoring solutions. We are a team with expertise in designing, building, operating, scaling and monitoring highly transactional Internet services used by thousands of companies and impacting the experience of millions of users. Catchpoint is funded by top-tier venture capital firm, Battery Ventures, which has invested in category leaders such as Akamai, Omniture (Adobe Systems), Optimizely, Tealium, BazaarVoice, Marketo and many more.
![]() Jan. 2, 2018 11:25 AM EST Reads: 925 |
By Elizabeth White ![]() Dec. 31, 2017 12:00 PM EST Reads: 2,227 |
By Pat Romanski ![]() Dec. 30, 2017 11:00 AM EST Reads: 2,035 |
By Pat Romanski ![]() Dec. 30, 2017 08:30 AM EST Reads: 14,932 |
By Liz McMillan ![]() Dec. 29, 2017 12:00 PM EST Reads: 3,130 |
By Liz McMillan ![]() Dec. 29, 2017 08:00 AM EST Reads: 3,196 |
By Pat Romanski ![]() Dec. 28, 2017 02:00 PM EST Reads: 4,180 |
By Liz McMillan ![]() Dec. 24, 2017 01:45 PM EST Reads: 2,201 |
By Elizabeth White ![]() Dec. 23, 2017 10:00 AM EST Reads: 2,109 |
By Elizabeth White ![]() Dec. 22, 2017 11:00 AM EST Reads: 1,707 |
By Elizabeth White ![]() Dec. 18, 2017 03:45 PM EST Reads: 3,258 |
By Elizabeth White ![]() Dec. 18, 2017 01:30 PM EST Reads: 3,291 |
By Elizabeth White ![]() Dec. 18, 2017 01:00 PM EST Reads: 5,149 |
By Liz McMillan ![]() Dec. 17, 2017 04:00 PM EST Reads: 2,104 |
By Pat Romanski ![]() Dec. 17, 2017 02:00 PM EST Reads: 2,299 |
By Elizabeth White ![]() Dec. 17, 2017 10:00 AM EST Reads: 2,298 |
By Liz McMillan ![]() Dec. 15, 2017 11:00 AM EST Reads: 3,083 |
By Elizabeth White ![]() Dec. 14, 2017 04:00 PM EST Reads: 2,159 |
By Liz McMillan ![]() Dec. 14, 2017 11:45 AM EST Reads: 2,226 |
By Elizabeth White ![]() Dec. 14, 2017 11:00 AM EST Reads: 2,226 |