Same site hosted on netlify, gatsby cloud and firebase has different transfer size


We are comparing different hosting solutions at my job. (I vouched for Netlify!)

Here is the exact same site hosted on 3 different platforms:

total transfer size: 53.9 KiB

total transfer size: 59.1 KiB

Gatsby Cloud
total transfer size: 62.7 KiB

One thing I don’t fully understand is why the total transfer size is different from one host to the other.
It makes sense for things like Time To First Byte to differ, but transfer size?
The only thing I can think of is the compression algorithm.
Gatsby Cloud seems to use gzip, so that could explain why it’s the biggest.
But both Netlify and Firebase use Brotli.

Can someone enlighten me?

@FelDev I’d start by saving each of the downloaded / transferred files and doing file compares on them to see what differences there are, if any.

I should’ve mentioned, we did that already.

@FelDev Would you care to share what you found when you did the file comparison?

While you’re at it, perhaps consider sharing how you came by this information, and what difference it makes?

Of course!

what you found when you did the file comparison?

Literally nothing, the public folders are exactly the same.

how you came by this information,

If you run lighthouse tests or use Page Speed Insights, PageSpeed Insights, you get the total transfer size.

and what difference it makes?

Heavier site == slower site, right?

Of course, a difference of 5KB is not huge, but could it grow to 100KB as our site becomes bigger?
Also, I just want to understand :sweat_smile:

@FelDev Did you look at the results of the GTMetrix comparison I performed? Each of these sites is virtually identical in performance.

No matter how big your site gets, visitors see only one page at a time, right? What am I missing?

@gregraven It’s not a big difference in performance. I get it.

But that’s not the question. The question is why does the exact same site weigh more when served by Netlify rather than Firebase?

Even if it’s a just few KB, why?

The three different vendors will have different ways in which files are compressed. Netlify sometimes uses gzip, sometimes brotli and other times… nothing at all! It’s like one person using 7zip and another using WinRAR to prepare .zip files.

Then, if you’re talking about data transfer, each vendor will have different request and response headers which will be of different sizes, which make up part of the data transfer too.


@FelDev I guess I’m not following. You’ve downloaded the same file from each of these hosts and all three files are identical. Therefore, you know that there is nothing added and nothing taken away from your code. Everything is equal there.

Then you’ve seen that in terms of performance, each of these three hosts deliver that identical content in virtually the same time. There’s almost no difference to speak of.

However, you remain concerned because some third-party utility over which you have no control tells you there’s a difference, even though you know from your own observations that there are no differences.

What am I missing?