Tight Mode: Why Browsers Produce Different Performance Results<\/h1>\nGeoff Graham<\/address>\n 2025-01-09T13:00:00+00:00
\n 2025-03-19T18:34:17+00:00
\n <\/header>\n
This article is sponsored by DebugBear<\/b><\/p>\n
I was chatting with Debug<\/a>B<\/a>ear<\/a>\u2019s Matt Zeunert and, in the process, he casually mentioned this thing called Tight Mode<\/strong> when describing how browsers fetch and prioritize resources. I wanted to nod along like I knew what he was talking about but ultimately had to ask: What the heck is \u201cTight\u201d mode?<\/em><\/p>\nWhat I got back were two artifacts, one of them being the following video of Akamai web performance expert Robin Marx speaking at We Love Speed in France a few weeks ago:<\/p>\n\n<\/div>\n<\/figure>\nThe other artifact is a Google document originally published by Patrick Meenan<\/a> in 2015 but updated somewhat recently in November 2023. Patrick\u2019s blog has been inactive since 2014, so I\u2019ll simply drop a link to the Google document for you to review<\/a>.<\/p>\nThat\u2019s all I have and what I can find on the web about this thing called Tight Mode that appears to have so much influence on the way the web works. Robin acknowledged the lack of information about it in his presentation, and the amount of first-person research in his talk is noteworthy and worth calling out because it attempts to describe and illustrate how different browsers fetch different resources with different prioritization. Given the dearth of material on the topic, I decided to share what I was able to take away from Robin\u2019s research and Patrick\u2019s updated article.<\/p>\n
It\u2019s The First of Two Phases<\/h2>\n
The fact that Patrick\u2019s original publication date falls in 2015 makes it no surprise that we\u2019re talking about something roughly 10 years old at this point. The 2023 update to the publication is already fairly old in \u201cweb years,\u201d yet Tight Mode is still nowhere when I try looking it up.<\/p>\n
So, how do we define Tight Mode? This is how Patrick explains it:<\/p>\n
\u201cChrome loads resources in 2 phases. \u201cTight mode\u201d is the initial phase and constraints [sic] loading lower-priority resources until the body is attached to the document (essentially, after all blocking scripts in the head have been executed).\u201d<\/p>\n
— Patrick Meenan<\/p><\/blockquote>\n
OK, so we have this two-part process that Chrome uses to fetch resources from the network and the first part is focused on anything that isn\u2019t a \u201clower-priority resource.\u201d We have ways of telling browsers which resources we<\/em> think are low priority in the form of the Fetch Priority API<\/a> and lazy-loading techniques that asynchronously load resources when they enter the viewport on scroll — all of which Robin covers in his presentation. But Tight Mode has its own way of determining what resources to load first.<\/p>\n<\/p>\n <\/p>\n
<\/p>\n
<\/a>\n Figure 1: Chrome loads resources in two phases, the first of which is called \u201cTight Mode.\u201d (Large preview<\/a>)
\n <\/figcaption><\/figure>\nTight Mode discriminates resources, taking anything and everything marked as High and Medium priority. Everything else is constrained and left on the outside, looking in until the body is firmly attached to the document, signaling that blocking scripts have been executed. It\u2019s at that point that resources marked with Low priority are allowed in the door during the second phase of loading.<\/p>\n
There\u2019s a big caveat to that, but we\u2019ll get there. The important thing to note is that\u2026<\/p>\n
Chrome And Safari Enforce Tight Mode<\/h2>\n
Yes, both Chrome and Safari have some working form of Tight Mode running in the background. That last image illustrates Chrome\u2019s Tight Mode. Let\u2019s look at Safari\u2019s next and compare the two.<\/p>\n<\/p>\n <\/p>\n
<\/p>\n
<\/a>\n Figure 2: Comparing Tight Mode in Chrome with Tight Mode in Safari. Notice that Chrome allows five images marked with High priority to slip out of Tight Mode. (Large preview<\/a>)
\n <\/figcaption><\/figure>\nLook at that! Safari discriminates High-priority resources in its initial fetch, just like Chrome, but we get wildly different loading behavior between the two browsers. Notice how Safari appears to exclude the first five PNG images marked with Medium priority where Chrome allows them. In other words, Safari makes all Medium- and Low-priority resources wait in line until all High-priority items are done loading, even though we\u2019re working with the exact same HTML. You might say that Safari\u2019s behavior makes the most sense, as you can see in that last image that Chrome seemingly excludes some High-priority resources out of Tight Mode. There\u2019s clearly some tomfoolery happening there that we\u2019ll get to.<\/p>\n
Where\u2019s Firefox in all this? It doesn\u2019t take any extra tightening measures when evaluating the priority of the resources on a page. We might consider this the \u201cclassic\u201d waterfall approach to fetching and loading resources.<\/p>\n<\/p>\n <\/p>\n
<\/p>\n
<\/a>\n Figure 3: Chrome and Safari have implemented Tight Mode while Firefox maintains a simple waterfall.(Large preview<\/a>)
\n <\/figcaption><\/figure>\nChrome And Safari Trigger Tight Mode Differently<\/h2>\n
Robin makes this clear as day in his talk. Chrome and Safari are both Tight Mode proponents, yet trigger it under differing circumstances that we can outline like this:<\/p>\n
\n 2025-03-19T18:34:17+00:00
\n <\/header>\n
What I got back were two artifacts, one of them being the following video of Akamai web performance expert Robin Marx speaking at We Love Speed in France a few weeks ago:<\/p>\n The other artifact is a Google document originally published by Patrick Meenan<\/a> in 2015 but updated somewhat recently in November 2023. Patrick\u2019s blog has been inactive since 2014, so I\u2019ll simply drop a link to the Google document for you to review<\/a>.<\/p>\n That\u2019s all I have and what I can find on the web about this thing called Tight Mode that appears to have so much influence on the way the web works. Robin acknowledged the lack of information about it in his presentation, and the amount of first-person research in his talk is noteworthy and worth calling out because it attempts to describe and illustrate how different browsers fetch different resources with different prioritization. Given the dearth of material on the topic, I decided to share what I was able to take away from Robin\u2019s research and Patrick\u2019s updated article.<\/p>\n The fact that Patrick\u2019s original publication date falls in 2015 makes it no surprise that we\u2019re talking about something roughly 10 years old at this point. The 2023 update to the publication is already fairly old in \u201cweb years,\u201d yet Tight Mode is still nowhere when I try looking it up.<\/p>\n So, how do we define Tight Mode? This is how Patrick explains it:<\/p>\n \u201cChrome loads resources in 2 phases. \u201cTight mode\u201d is the initial phase and constraints [sic] loading lower-priority resources until the body is attached to the document (essentially, after all blocking scripts in the head have been executed).\u201d<\/p>\n — Patrick Meenan<\/p><\/blockquote>\n OK, so we have this two-part process that Chrome uses to fetch resources from the network and the first part is focused on anything that isn\u2019t a \u201clower-priority resource.\u201d We have ways of telling browsers which resources we<\/em> think are low priority in the form of the Fetch Priority API<\/a> and lazy-loading techniques that asynchronously load resources when they enter the viewport on scroll — all of which Robin covers in his presentation. But Tight Mode has its own way of determining what resources to load first.<\/p>\n <\/p>\n <\/a> Tight Mode discriminates resources, taking anything and everything marked as High and Medium priority. Everything else is constrained and left on the outside, looking in until the body is firmly attached to the document, signaling that blocking scripts have been executed. It\u2019s at that point that resources marked with Low priority are allowed in the door during the second phase of loading.<\/p>\n There\u2019s a big caveat to that, but we\u2019ll get there. The important thing to note is that\u2026<\/p>\n Yes, both Chrome and Safari have some working form of Tight Mode running in the background. That last image illustrates Chrome\u2019s Tight Mode. Let\u2019s look at Safari\u2019s next and compare the two.<\/p>\n <\/p>\n <\/a> Look at that! Safari discriminates High-priority resources in its initial fetch, just like Chrome, but we get wildly different loading behavior between the two browsers. Notice how Safari appears to exclude the first five PNG images marked with Medium priority where Chrome allows them. In other words, Safari makes all Medium- and Low-priority resources wait in line until all High-priority items are done loading, even though we\u2019re working with the exact same HTML. You might say that Safari\u2019s behavior makes the most sense, as you can see in that last image that Chrome seemingly excludes some High-priority resources out of Tight Mode. There\u2019s clearly some tomfoolery happening there that we\u2019ll get to.<\/p>\n Where\u2019s Firefox in all this? It doesn\u2019t take any extra tightening measures when evaluating the priority of the resources on a page. We might consider this the \u201cclassic\u201d waterfall approach to fetching and loading resources.<\/p>\n <\/p>\n <\/a> Robin makes this clear as day in his talk. Chrome and Safari are both Tight Mode proponents, yet trigger it under differing circumstances that we can outline like this:<\/p>\nIt\u2019s The First of Two Phases<\/h2>\n
<\/p>\n
\n <\/figcaption><\/figure>\nChrome And Safari Enforce Tight Mode<\/h2>\n
<\/p>\n
\n <\/figcaption><\/figure>\n<\/p>\n
\n <\/figcaption><\/figure>\nChrome And Safari Trigger Tight Mode Differently<\/h2>\n