# External script

*noun*

say it: **“ek-STER-nul SKRIPT”** **/ɪkˈstɝnəl skrɪpt/**

JavaScript kept in its own .js file and loaded through a script element's src attribute, so many pages can share it and the browser can keep a copy.

## What is **External script**?

**External script** — A script loaded from a separate resource through a script element's src attribute.

```html
<script src="checkout.js" defer></script>
```

## In a sentence

- “I moved the cart code into cart.js, an **external script** that every shop page loads.”

Level: Journeyman · [More JavaScript terms at this level](https://www.ask-codey.com/glossary?category=javascript&level=3)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/external-script
