So currently their implementation is a bit more complex than just go to `</head>`. It's a mix of 1024 rule and then the strategy after. https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/html/parser/html_meta_charset_parser.cc;l=58-84
Bug 1701828 Comment 8 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
So currently their implementation is a bit more complex than just go to `</head>`. It's a mix of 1024 rule and then the strategy after which is according to the code and comment: ``` // We still don't have an encoding, and are in the head. The following tags // are allowed in <head>: SCRIPT|STYLE|META|LINK|OBJECT|TITLE|BASE // We stop scanning when a tag that is not permitted in <head> is seen, rather // when </head> is seen, because that more closely matches behavior in other // browsers; more details in <http://bugs.webkit.org/show_bug.cgi?id=3590>. // Additionally, we ignore things that looks like tags in <title>, <script> // and <noscript>; see: // <http://bugs.webkit.org/show_bug.cgi?id=4560> // <http://bugs.webkit.org/show_bug.cgi?id=12165> // <http://bugs.webkit.org/show_bug.cgi?id=12389> // Since many sites have charset declarations after <body> or other tags that // are disallowed in <head>, we don't bail out until we've checked at least // bytesToCheckUnconditionally bytes of input. ``` https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/html/parser/html_meta_charset_parser.cc;l=58-84