O'Reilly logo

Mobile Web Performance Optimization by S. Niranga

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

File order of external style sheets and scripts

When we render a page, the order of the CSS and JavaScript's files that are located in the code have a direct impact on how quickly that we can show the page to the user. If we can load the CSS files before the JavaScript files, the page can start the rendering straight away, and we can download other files parallel to the rendering which increase the website rendering speed.

On the other hand, if we wait to download CSS files after the JavaScript files, the website will have to wait until all the JavaScript files get downloaded to start the page rendering. Another issue with this is that if a JavaScript code has a CSS code dependency, there will be a conflict.

To minimize the impact, the recommended ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required