I roughly know how browser parses a website, and how it does all the job from I type stackoverflow.com
to I have the page in my browser.
The question here is how can I override or manipulate its behavior in order to force a specific set of tasks in the order I want.
I mean something like this:
- Download only the HTML code of above the fold section of the website.
- Download and parse the stylesheet of above the fold section of the website.
- Render above the fold
- Download images of above the fold
- Download the JS of above the fold
- While parsing the JS, download another section of the website
- Repeat...
In my example, I just want to render above the fold ASAP and then render the rest of the page.
Obviously, this is a very simplified example of I what asking if is possible to do, and also I want to know if there is some library that implements this functionality (or something similar).