YouTube is lagging its website for Firefox and Edge users on desktop, and it's causing us confusion .
The platform has recently experienced a surge in revenue generation, as it has decided to block AdBlockers and promote the purchase of YouTube Premium. This choice has many advantages, as the platform must ensure financial viability and reward the creators who depend on it. However, these actions by YouTube, with the delays, seem to make little sense.
See also: Microsoft: Fixes connectivity errors in Office login
Reddit user vk6_ shared a video showing a five-second delay when loading a YouTube video using Mozilla Firefox. After switching from Firefox to Chrome, this delay is no longer seen.
See the image below, which shows the delay:

Reddit user vk6_ points out that this is not a Firefox bug. It appears that the JavaScript in the YouTube client on your computer includes code that adds an artificial five-second delay.
We can confirm the existence of the code snippet. However, we cannot confirm whether the code actually adds a five-second delay after checking the user's browser of choice.
After inspecting the YouTube Javascript file, you can verify the existence of the code by searching for the following code snippet using the search function (press Ctrl + F to open the search window):
CODE
setTimeout(function(){c();a.resolve(1)},5E3);
Many users, on the other hand, have reported the same issue on both Firefox and Edge. They report experiencing lag even without extensions enabled, suggesting that the lag may be due to some other reason. Furthermore, the lag doesn't just occur once, but seems to repeat itself whenever links from YouTube are opened in new tabs.
Read also: Firefox Review Checker: The feature that will check for fake product reviews
Some discussions on this topic suggest that the code could represent a flexible implementation of alternative advertising when the user is using AdBlockers. The corresponding code could ensure that an ad is displayed for at least five seconds before the actual video is displayed.
Source: androidauthority.com
