Description
lol-html is a streaming HTML parser and rewriter, written in Rust, with a CSS selector-based API. It is designed to change HTML on the fly with minimal buffering, so it can handle very large documents and run in environments with limited memory. The project's README says the crate is the back end for HTML rewriting in Cloudflare Workers, and that it can also be used as a standalone library for a wide range of rewriting and analysis tasks. You describe the elements to match with CSS selectors and attach handlers to change them as the document streams through. The README includes an example that rewrites insecure hyperlinks. Bindings exist for C, Lua, Go and Ruby, with the Go and Ruby bindings unofficial and not from Cloudflare. Documentation is on docs.rs, and the library is BSD licensed.…
Highlights
- Streaming HTML rewriting with minimal buffering
- CSS selector-based API
- Handles very large documents
- Works in low-memory environments
- BSD licensed, with bindings for C, Lua, Go and Ruby
Ratings & Reviews
No ratings yet
Be the first to rate Lol Html.
People also visit
Lol Html FAQ
What is lol-html?
A low-output-latency streaming HTML parser and rewriter with a CSS selector API.
Where is it used?
As the back end for HTML rewriting in Cloudflare Workers, according to the README.
Can I use it on its own?
Yes. The README says it can be used as a standalone library for HTML rewriting and analysis.
Is there a binding for my language?
The README lists C, Lua, Go and Ruby. The Go and Ruby bindings are unofficial.
Where is the documentation?
On docs.rs for the lol_html crate.
What are the best Lol Html alternatives?
Popular alternatives to Lol Html include Jsonriver, Stream Parser and N3.js. See all Lol Html alternatives
