78 views
Что происходит после ввода `https://yandex.ru` в браузере и нажатия Enter?
Asked at
AI answer
In simplified terms, a browser goes through several steps:
- It parses the address: the
httpsscheme, theyandex.rudomain, and any path and parameters. It checks the cache and rules such as HSTS. - It looks up the domain’s IP address via DNS if a suitable record is not already in the cache.
- It establishes a connection to the server: usually TCP, or QUIC for HTTP/3. For HTTPS, it performs a TLS handshake and verifies the server’s certificate.
- It sends an HTTP request, such as
GET /, with headers and cookies. If a proxy or redirects are involved, those are handled as well. - It receives a response. For HTML, the browser parses the document, loads linked resources—CSS, JavaScript, images, and fonts—and builds the DOM and CSSOM.
- It calculates styles and layout, renders the page, and executes JavaScript. Scripts can modify the DOM and trigger additional network requests.
In practice, DNS lookups, connections, and resources may come from the cache, and many operations run in parallel.
Also asked at Касперский
Similar questions
- How does DNS work, at least in simple terms? Who sits at the top of this hierarchy?
- What happens after a user enters a website address in the browser and presses Enter?
- What happens after entering a domain name in the browser's address bar and pressing Enter? Describe the sequence of events.
- In simple terms, how does the “S” in HTTPS work? What kind of encryption is used there—symmetric or asymmetric?
- How can you inspect what data is sent and returned in a request in a web application (for example, whether a password is being transmitted)?