Reputation: 11174
When the browser requests a website, any website from a HTTP server, which of the two parses the site's content in order to know which other files need to be included on the webpage?
What I mean is this:
html
file and then observers that it needs to import some external css
files and HE is the one who requests them.OR
html
page?I'm guessing the first case is the correct one, but if someone can confirm and maybe clarify it, I'd appreciate it.
Upvotes: 0
Views: 41
Reputation: 874
According to Wikipedia -
The primary function of a web server is to cater web page to the request of clients using the Hypertext Transfer Protocol (HTTP). This means delivery of HTML documents and any additional content that may be included by a document, such as images, style sheets and scripts.
and
The primary purpose of a web browser is to bring information resources to the user ("retrieval" or "fetching"), allowing them to view the information ("display", "rendering"), and then access other information ("navigation", "following links").
It is the Browser that parses the HTML and request for the associated contents.
Upvotes: 1
Reputation: 781804
It's all done by the client (which is usually a browser). When it sees <script>
, <iframe>
, <img>
, <link>
, etc. tags that reference other documents, it downloads them if necessary.
Upvotes: 1