All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Improving HTML Named Character Reference Tokenization: A Comparison with Major Browsers

By

todsacerdoti

11mo ago· 97 min readenNews

Summary

The article discusses the author's implementation of a more efficient and compliant data structure for HTML tokenization, specifically focusing on named character references. The implementation was ported to C++ and used to improve the Ladybird browser. The author compares their implementation to those used in major browser engines like Blink/WebKi.

Key quotes

· 3 pulled
A while back, for no real reason, I tried writing an implementation of a data structure tailored to the specific use case of the Named character reference state of HTML tokenization.
Recently, I took that implementation, ported it to C++, and used it to make some efficiency gains and fix some spec compliance issues in the Ladybird browser.
Throughout this, I never actually looked at the implementations used in any of the major browser engines (no reason for this, just me being dumb).
Snippet from the RSS feed
Stumbling into a (slightly) better HTML named character reference tokenization implementation

You might also wanna read