AndreiBogdan AndreiBogdan - 1 month ago 8
Apache Configuration Question

Who knows which files should be included in a website?

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:


  1. the browser asks for the
    html
    file and then observers that it needs to import some external
    css
    files and HE is the one who requests them.



OR


  1. the HTTP server when faced with a request for a website, parses (already knows) which sites need to be linked to a certain webpage and sends them alongside the
    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.

Answer

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.