JavaScript
Written by Andy Sim
Last updated
JavaScript is a programming language that runs in the browser to make web pages interactive: menus that open, forms that check themselves, sliders, maps, and content that updates without reloading.
It works alongside HTML and CSS. Too much JavaScript, or badly written scripts, can slow a page and make it feel heavy on a phone. It can also run on the server with tools such as Node.js. Search engines can read pages that rely on JavaScript, but important content should still be available quickly.
Examples
- A booking form that checks the date before you send it.
- A gallery that opens a photo full screen.
- A search box that shows results as you type.
Why it matters for your website
Use it where it helps and avoid adding scripts you do not need. Every extra script, such as a chat tool or tracker, adds loading time, so review them regularly.