Front End Web Developer Question:
Download Questions PDF

Explain me why Do We Recommend External Css Or Javascript Versus Inline?

Front End Web Developer Interview Question
Front End Web Developer Interview Question

Answer:

Inline CSS or JavaScript has bad impact on site performance.

Your HTML code will weigh more as you use inline scripts, whereas external scripts reduces HTML file size which helps fast rendering of webpage.

HTML code will never be cached so inline scripts. Contrary to that, external dependencies, such as CSS and JavaScript files, will be cached by the visitor's web browser. So it reduces https requests each time user click through web pages.

It is hard to maintain Inline CSS and JavaScript code. Where having code in just one centralized location is a lot more preferable than changing exactly the same kind of code snippets spread all over the files in the web site.

Download Front End Web Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Explain me how To Optimize The Page Using Front End Code Or Technology?Tell me difference between null and undefined?