DEV Community

Discussion on: How the browser renders a web page

Collapse
 
mandarbadve profile image
Mandar Badve

Great post, have one question - In case of Ajax or SPA, all of these steps executed or is there any difference?

Collapse
 
starkiedev profile image
James Starkie

Thanks! These steps would still be executed, the differences would come afterwards really. In the case of a SPA, most would only happen once (on initial load), the trade-off being that those steps will likely take longer because there are more assets to load up-front. But the last couple of steps will execute every time the DOM is updated (e.g. navigating to a new 'page') as the layout will need to be recalculated and repainted each time.

Collapse
 
mandarbadve profile image
Mandar Badve

Make sense, thanks.