Earlier today, we covered an interesting story wherein users online reported about YouTube loading slower when using Firefox. What was curious about it was the fact that YouTube would load perfectly normally if the browser was tricked into thinking it was Google Chrome using a User Agent switcher.
This behavior was picked up by Reddit users mainly and although it may seem to be like a performance optimization issue or a lack of it by the Mozilla Firefox development team, sharp-eyed users noticed code sections that had a 5000 ms or a five-second delay that appeared to be intentionally placed there for some reason.
When requested for comment on the matter, Google provided the following statement to 9to5Google:
To support a diverse ecosystem of creators globally and allow billions to access their favorite content on YouTube, we’ve launched an effort to urge viewers with ad blockers enabled to allow ads on YouTube or try YouTube Premium for an ad free experience. Users who have ad blockers installed may experience suboptimal viewing, regardless of the browser they are using.
Hence according to Google, the delay was due to installed ad blockers which was leading to a "suboptimal viewing" experience. Interestingly the tech giant further added that this was to be the case "regardless of the browser they are using" suggesting that it was not just Firefox that should be affected.
So it seems like there is more than meets the eye because at quick glance, most would assume foul play is involved especially since spoofing Chrome seems to work. And there is apparently an explanation for that too.
Another Redditor frisch85 went deeper into the suspicious code and it seems to nicely align with the statement provided by Google. They explain:
I checked the code with the part you quoted, I doubt this is firefox related as there"s no check on the user agent when this code is executed. It looks more like an ad-thing.
.. this seems to be just lazy implementation instead of doing anything shady,..
To me this looks more like the lazy attempt of ensuring an ad is being displayed for at least 5 seconds until the actual video is going to load.
Why is it slow the first time someone loads and not every time? Simple, YT doesn"t reload the page as we would expect it to reload, instead it prevents you from reloading the whole page but causes itself to reload the contents without reloading all of the scripts, which some websites do these days and I don"t like it tbh as it will load faster but it"s not an actual reload.
Hence, the example of YouTube running perfectly on Chrome after struggling on Firefox could have more to do with how YouTube itself "reloads" instead of some shenanigans being involved.
As an online publication, Neowin too relies on ads for operating costs and, if you use an ad blocker, we"d appreciate being whitelisted. In addition, we have an ad-free subscription for $28 a year, which is another way to show support!