- 9 min read
- Performance,
Optimization,
Tools
I modified into once chatting with DebugBear’s Matt Zeunert and, within the blueprint, he casually mentioned this thing known as Tight Mode when describing how browsers acquire and prioritize sources. I wished to nod alongside bask in I knew what he modified into once talking about however indirectly had to take a look at: What the heck is “Tight” mode?
What I purchased succor had been two artifacts, one in all them being the following video of Akamai internet efficiency expert Robin Marx speaking at We Like Tempo in France about a weeks ago:
The diversified artifact is a Google narrative on the beginning do published by Patrick Meenan in 2015 however updated critically no longer too lengthy ago in November 2023. Patrick’s blog has been idle since 2014, so I’ll merely tumble a hyperlink to the Google narrative so that you can overview.
That’s all I even beget and what I’m capable of bag on the accumulate about this thing known as Tight Mode that looks to beget so grand affect on the vogue the accumulate works. Robin acknowledged the ignorance about it in his presentation, and the amount of first-particular person research in his talk is worthy and price calling out because it makes an are trying to picture and illustrate how diversified browsers acquire diversified sources with diversified prioritization. Given the dearth of cloth on the topic, I made up my mind to part what I modified into once in a predicament to take a ways flung from Robin’s research and Patrick’s updated article.
It’s The First of Two Phases
The truth that Patrick’s normal newsletter date falls in 2015 makes it no surprise that we’re talking about something roughly 10 years outmoded at this point. The 2023 update to the newsletter is already somewhat outmoded in “internet years,” but Tight Mode is silent nowhere once I are trying looking out it up.
So, how will we define Tight Mode? That is how Patrick explains it:
“Chrome hundreds sources in 2 phases. “Tight mode” is the initial section and constraints [sic] loading lower-precedence sources until the physique is linked to the narrative (in fact, in spite of every little thing blocking scripts within the pinnacle beget been carried out).”
— Patrick Meenan
OK, so we beget got this two-section route of that Chrome makes employ of to acquire sources from the community and the precious section is centered on something that isn’t a “lower-precedence helpful resource.” Now we beget ways of telling browsers which sources we deem are low precedence within the originate of the Get Priority API and idle-loading tactics that asynchronously load sources after they enter the viewport on scroll — all of which Robin covers in his presentation. But Tight Mode has its hold draw of determining what sources to load first.

Tight Mode discriminates sources, taking something and every little thing marked as Excessive and Medium precedence. All the pieces else is constrained and left on the out of doorways, looking out in until the physique is firmly linked to the narrative, signaling that blocking scripts beget been carried out. It’s at that time that sources marked with Low precedence are allowed within the door throughout the second section of loading.
There’s a gargantuan caveat to that, however we’ll gain there. The precious thing to portray is that…
Chrome And Safari Put in power Tight Mode
Yes, both Chrome and Safari beget some working originate of Tight Mode operating within the background. That final checklist illustrates Chrome’s Tight Mode. Let’s stare at Safari’s next and compare the two.

Watch at that! Safari discriminates Excessive-precedence sources in its initial acquire, excellent bask in Chrome, however we gain wildly diversified loading behavior between the two browsers. Be taught about how Safari looks to exclude the precious 5 PNG shots marked with Medium precedence where Chrome allows them. In diversified words, Safari makes all Medium- and Low-precedence sources wait in line until all Excessive-precedence devices are carried out loading, even when we’re working with the right identical HTML. You’ll roar that Safari’s behavior makes the most sense, as which you would possibly presumably stumble on in that final checklist that Chrome reputedly excludes some Excessive-precedence sources out of Tight Mode. There’s clearly some tomfoolery going down there that we’ll gain to.
Where’s Firefox in all this? It doesn’t take any extra tightening measures when evaluating the precedence of the sources on a internet page. Shall we take into accout this the “traditional” waterfall blueprint to fetching and loading sources.

Chrome And Safari Trigger Tight Mode Otherwise
Robin makes this sure as day in his talk. Chrome and Safari are both Tight Mode proponents, but trigger it beneath differing circumstances that we can define bask in this:
| Chrome | Safari | |
|---|---|---|
| Tight Mode introduced about | While blocking JS within the is busy. |
While blocking JS or CSS wherever is busy. |
Be taught about that Chrome handiest looks on the narrative when prioritizing sources, and handiest when it entails JavaScript. Safari, within the period in-between, also looks at JavaScript, however CSS as smartly, and wherever this stuff will likely be situated within the narrative — irrespective of whether or no longer it’s within the or . That helps designate why Chrome excludes shots marked as Excessive precedence in Figure 2 from its Tight Mode implementation — it handiest cares about JavaScript on this context.
So, even when Chrome encounters a script file with fetchpriority="high" within the narrative physique, the file is no longer idea to be a “Excessive” precedence and this would presumably be loaded after the leisure of the devices. Safari, within the period in-between, honors fetchpriority wherever within the narrative. This helps designate why Chrome leaves two scripts on the table, so as to talk, in Figure 2, whereas Safari looks to load them throughout Tight Mode.
That’s no longer to inform Safari isn’t doing something uncommon in its route of. Given the following markup:
…which you would possibly presumably quiz of that Safari would prolong the two Low-precedence scripts within the until the 5 shots within the are downloaded. But that’s no longer the case. As an different, Safari hundreds these two scripts throughout its version of Tight Mode.

with Excessive precedence. (Fats preview)Chrome And Safari Exceptions
I mentioned earlier that Low-precedence sources are loaded in throughout the second section of loading after Tight Mode has been finished. But I also mentioned that there’s a gargantuan caveat to that behavior. Let’s contact on that now.
In accordance to Patrick’s article, we all know that Tight Mode is “the initial section and constraints loading lower-precedence sources until the physique is linked to the narrative (in fact, in spite of every little thing blocking scripts within the pinnacle beget been carried out).” But there’s a second section to that definition that I disregarded:
“In tight mode, low-precedence sources are handiest loaded if there are lower than two in-flight requests on the time that they are found.”
A-ha! So, there is a ability for low-precedence sources to load in Tight Mode. It’s when there are lower than two “in-flight” requests going down after they’re detected.
Wait, what does “in-flight” even suggest?
That’s what’s supposed by lower than two Excessive- or Medium-precedence devices being requested. Robin demonstrates this by evaluating Chrome to Safari beneath the identical stipulations, where there are handiest two Excessive-precedence scripts and ten peculiar shots within the mix:
Let’s stare at what Safari does first because it’s the most easy blueprint:

Nothing refined about that, perfect? The 2 Excessive-precedence scripts are downloaded first and the 10 shots trudge alongside with the trek in perfect after. Now let’s stare at Chrome:

Now we beget the two Excessive-precedence scripts loaded first, as expected. But then Chrome decides to let within the precious 5 shots with Medium precedence, then excludes the final 5 shots with Low precedence. What. The. Heck.
The reason is a noble one: Chrome needs to load the precious 5 shots because, presumably, the Largest Contentful Paint (LCP) is mostly going to be a form of shots and Chrome is hedging bets that the accumulate will likely be sooner overall if it automatically handles about a of that good judgment. As soon as more, it’s a noble line of reasoning, even when it isn’t going to be 100% appropriate. It does muddy the waters, despite the truth that, and makes determining Tight Mode draw more difficult when we stumble on Medium- and Low-precedence devices handled as Excessive-precedence residents.
Even muddier is that Chrome looks to handiest fetch as a lot as 2 Medium-precedence sources on this discriminatory route of. The the leisure are marked with Low precedence.
That’s what we suggest by “lower than two in-flight requests.” If Chrome sees that handiest one or two devices are coming into Tight Mode, then it automatically prioritizes as a lot as the precious 5 non-severe shots as an LCP optimization effort.
Truth be told, Safari does something the same, however in a distinct context. As an different of accepting Low-precedence devices when there are lower than two in-flight requests, Safari accepts both Medium and Low precedence in Tight Mode and from wherever within the narrative irrespective of whether or no longer they are situated within the or no longer. The exception is any asynchronous or deferred script because, as we noticed earlier, these gain loaded perfect away anyway.
How To Manipulate Tight Mode
This might well bear for a mountainous apply-up article, however here’s where I’ll refer you straight to Robin’s video because his first-particular person research is price ingesting straight. But here’s the gist:
- Now we beget these excessive-stage aspects that can presumably attend affect precedence, at the side of helpful resource hints (i.e.,
preloadandpreconnect), the Get Priority API, and idle-loading tactics. - We can display veil
fetchpriority="high"andfetchpriority="low"on devices.
- The employ of
fetchpriority="high"is one draw we can gain devices lower within the provision incorporated in Tight Mode. The employ offetchpriority="lowis one draw we can gain devices greater within the provision excluded from Tight Mode. - For Chrome, this works on shots, asynchronous/deferred scripts, and scripts situated on the underside of the
. - For Safari, this handiest works on shots.
As soon as more, look Robin’s talk for the rotund legend beginning spherical the 28:32 marker.
That’s Tight… Mode
It’s bonkers to me that there is so tiny recordsdata about Tight Mode floating spherical the accumulate. I would quiz of something bask in this to be smartly-documented somewhere, for sure over at Chrome Developers or somewhere the same, however all we beget got is a mild-weight Google Doc and a thorough presentation to coloration an image of how two of the three most valuable browsers acquire and prioritize sources. Let me know whenever you happen to’ve got further recordsdata that you’ve either published or stumbled on — I’d love to embody them within the dialogue.
(yk)