rust-kr / browser-engineering Goto Github PK
View Code? Open in Web Editor NEWWeb Browser Engineering
Home Page: https://browser.engineering/
License: MIT License
Web Browser Engineering
Home Page: https://browser.engineering/
License: MIT License
data: Yet another scheme is data, which allow inlining HTML content into the URL itself. Try navigating to data:text/html,Hello world! in a real browser to see what happens. Add support for this scheme to your browser. The data scheme is especially convenient for making tests without having to put them in separate files.
This avoids printing the title and style information. The loop in show will need more variables to track tag names.
In addition to HTTP and HTTPS, there are other schemes, such as view-source; navigating in a real browser to view-source:browser.engineering/http.html shows the HTML source of this chapter rather than its rendered output. Add support for the view-source scheme. Your browser should print the entire HTML file as if it was text. Hint: To do so, you can utilize the entities from the previous exercise, and add an extra transform() method that adjusts the input to show() when in view-source mode, like this: show(transform(body))
Along with Host, send the Connection header in the request function with the value close. Your browser can now declare that it is using HTTP/1.1. Also add a User-Agent header. Its value can be whatever you want—it identifies your browser to the host. Make it easy to add further headers in the future
Implement HTTP 301 Moved Permanently for both Python and Rust. Use Location header.
TLS is not yet implemented. Implement both in Python and in Rust. Use rustls for Rust.
Implement support for the less-than (<) and greater-than (>) entities.
These should be printed as < and >, respectively. For example, if the HTML response was <div>abc<div>,
the show method of your browser should print <div>abc</div> (and not just abc).
Entities allow web pages to include these special characters without the browser interpreting them as tags.
Implement Accept-Encoding: gzip for both Python and Rust. Use flate2 for Rust.
By the way, many web servers send compressed data using a Transfer-Encoding called chunked. You’ll want to add support for it as well
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.