Overview

Netlify one of the most popular choice among those looking to host a static website. Github pages is a free static site hosting service offered by the largest git service Github. Both are popular among those looking to host a static site. Both are excellent and responsive and provide a great hosting solution. Today we are going to find out among the two which is the fastest. Speed is one of the factors considered by the search engine on ranking. And also it is said that a large number of people will exit the site if the site does not load under 3 seconds. In this article we are going to compare both Github pages and Netlify on the basis of their speed.

Our Test Conditions

We set up a two identical websites on github pages and netlify. In fact both of them were deployed from the same github repository. The site was built using the static site generator Jekyll. We installed the mediumish theme on our test site. The theme already had a few posts built in complete with images. This helped us to simulate a real world scenario. The size of the webpage was around 1.9 MB. So the average size. There was a good number of css and js files on the webpage. We took multiple runs to minimize error and also to give the cdn time to cache resources. Because usually the first one or two requests will be cache miss as the cdn cache will be probably expired. But after a few visits everything will start to get served from the cdn.

Services we used for the speed test are given below.

So these are tools and services we used to conduct this test. Before giving you the results I have to tell you in some cases they were not consistent for both services.The next thing is just my personal opinion. So i have blurred it if you want you can click on the blurred text to un blur it.Among the two services i found Netlify to be little more consistent.

Both Github pages and Netlify are excellent solutions for hosting your site.Now lets find out who is faster and by how much.

Results

Inspect option in Google Chrome

Netlify speed test result

This speed test may not be that accurate as my internet is a bit slow.

Github Pages Speed Test

This speed test may not be that accurate as my internet is a bit slow.

Pingdom Results

Netlify speed test result

As you can see a 2 MB webpage loaded in 475ms which is very fast.We ran multiple tests and took the most concordant result.

Github Pages Speed Test

As you can see the 2 MB webpage loaded in 522 ms which is also very fast. A 47 ms difference in loading times is negligible. You may have noticed that the github pages version had 30 requests compared to 29 requests on netlify version. We don't know why. Both are exactly the same site and are even deployed from the same repository.

GTmetrix

Netlify speed test result

It is the same web page. It took 1.3 seconds to load.I don't understant why different sites are showing different number of requests. So as you can see it is very fast. Don't mind the low page speed score it is because I haven't done any sort of optimizations like serving server scaled images or anything like that at all. This is just the out of the box speed test.

Github Pages Speed Test

It is the exactly same web page and it took 2.0 seconds to load which is not in any means is slow. But in comparison netlify achieved 1.3 seconds.

dotcom-monitor

Netlify speed test result

It is the same web page. The average first time visit took 2.3 seconds where as a second time visit took 1.3 seconds which is one second less compared to first time visit. It is probably because when the site was visited first time the cdn cache might have been empty. But during the second visit probably everything was served from the cdn cache.

Github Pages Speed Test

It is the exactly same web page. Here the average first time visit took a big 4.6 seconds which is slow and the average second time visit took only 634.4 ms which is very fast.

But here we have to give the point to netlify because netlify version of the site took only 2.3 seconds for first time visit which is fast and github pages version took twice as long. The reason for giving point to netlify is that netlify managed to load the site in a average time of 2.3 and 1.3 seconds for the first and second visit respectively.Both were fast. But in the case of github pages version one was extremely fast and other was slow. So I am giving point to netlify in this round.

Dareboost speed test

Netlify speed test result

The time to first byte was 0.15 seconds and start render was 0.87 seconds.The fully loaded time was 2.02 seconds

Github Pages Speed Test

The time to first byte was 0.12 seconds and start render was 0.47 seconds. The fully loaded time was 2.05 seconds.

The difference is negligible.

Webpage test Speed Test

Netlify speed test result

Here it took 3.816s to load.

Github Pages Speed Test

So here it took 3.793 seconds to load the site. The difference is very small but here github pages did better in Load Time, Speed Index..

Keycdn Speed Test

Netlify speed test result

Here netlify version took only 2.2 seconds which is fast

Github Pages Speed Test

Here the github pages version took 3 seconds to fully load.

Conclusion

I know some people are going to think that this test was not fair because one version has one request less than the other.But I want to tell you that both websites were deployed from the same github repository so I don't know why that happened. But I don't think it is going to make much of a difference as both pages were the same size. I am not going to say one service lost and the other won.As you can see in most cases the differences very small. For me personally I think Netlify did better. In the below table the fully loaded times of both the versions are given.

Tool or Service used Netlify Github Pages Chrome Inspector 3.78s 4.57s Pingdom 475ms 522ms GTmetrix 1.3s 2.0s dotcom-monitor 2.3s,1.3s 4.6s,634.4ms Dareboost 2.02s 2.05s Webpage Test 3.816s 3.793s Keycdn Speed Test 2.2s

Feel free to pick your own winner. For my use cases I think Netlify is the winner.The site you are reading now is hosted on Vercel.

The featured image on the top was from pixabay. Image by Bethany Drouin from Pixabay