Answer the question
In order to leave comments, you need to log in
How does the server send pages?
Here a person comes to the site, he somehow gets the first page in order to work if it was a Single Page application. If this is a multipage application, then in this case the server returns some page.
How does the server transfer pages or give pages away?
Does it render it as HTML?
What are the ways to transfer pages?
Answer the question
In order to leave comments, you need to log in
Yes, over HTTP/HTTPS, and usually in HTML format. The browser makes a GET request and receives the data.
Auxiliary files are also transmitted over the same HTML - CSS, JS scripts, pictures.
Ronald McDonald wrote everything correctly, I’ll add:
Pages, or rather data, can be transferred using other protocols, such as ftp, and on a local network you can even open using the smb protocol (windows only) or even local files ( file:///path_to_html )), but as far as I know for security issues, mixing different modes, including https and http, is prohibited by default (if the start page is http, then it’s probably possible, but soon all browsers will loudly warn that this is bad, while only hinting from above)
Data can be transmitted not only regular http but also with the help of its websocket extension, in this case, you can also send messages the other way around, from the client to the server.
There is also the webrtc protocol, which allows auxiliary data to be downloaded / transferred not from / to the server, but with other users of the p2p website, the mode is not simple (not everyone supports the same standard), is blocked by some inadequate ones (unfortunately, many, for example, mobile ones) providers, but it exists and allows you to save a lot on network traffic for heavy media content.
And in the end, browsers allow applications to register their protocols, but it actually works either as a regular http with a substitution or as a launch of a third-party application, and you can’t mix different protocols on the same page.
ps there is also an interesting data uri standard that allows you to place the content of an element directly in the address bar
data:text/html;charset=utf-8;base64,SGVsbG8gPHNjcmlwdD5hbGVydCgnd29ybGQnKTs8L3NjcmlwdD4=
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question