![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are the differences between inline JavaScript and External file?
The following are the difference between inline JavaScript and external file −
External scripts
- The browser stores the external script once it is downloaded for the first time. If it is to be referenced again, then no additional download is needed.
- This reduces download time and size.
- The async and defer attributes have an effect. If these attributes are present the script will change the default behavior.
Inline scripts
- Inline Scripts are executed immediately.
- It gets loaded instantly and there is no need to trigger another request.
- The async and defer attributes has no effect.
- Inline Scripts are more useful for server-side dynamic rendering.
Advertisements