Jump to content

Website Order


DizzyDan

Recommended Posts

I'm not sure how to explain this but my question is can anyone explain or link me to an article that explains the order in which the browser reads the files of a website. Like after you click a link it first reads the html then css then PHP then javascript etc...

Link to comment
Share on other sites

The first request goes to whatever URL you clicked on, which presumably is going to return some HTML content. Everything else happens based on the order that it shows up in the HTML. For example, anything in the head section (linked stylesheets, external Javascript files, etc) will be downloaded before the browser even starts showing any page content. You can also have script or link tags inside the body content, and when the browser reaches that section of the HTML to render, it will send the request for those files when it finds those tags in the body. If you have an img tag before a script tag, it will send the request for the image file first, then the Javascript file. There are various techniques that you can use to tell the browser not to wait for something to finish downloading, or to download it once everything else is loaded.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...