Articles

JavaScript: what it is and how we use it

JavaScript is the language that gives a site behaviour: menus, forms, animation, maps and anything that responds to a click.

Code on a computer monitor
Photo: Markus Spiske markusspiske, CC0, Wikimedia Commons

1. How it works

JavaScript runs right in the visitor’s browser and responds to what they do: it opens a menu, checks a form, moves a map or loads more content without reloading the page. It is the only programming language browsers run natively.

2. Why it matters to a business

For a business what matters is having exactly as much of it as needed. A page full of scripts is slow and can misbehave on a weaker phone.

3. How we use it

We use it sparingly, only where it adds value, so the page stays fast.

4. When it fits

It suits forms, menus, maps and other interactive elements.

5. What to watch for

Unneeded scripts slow loading, especially on mobile.

6. In practice

We use JavaScript sparingly: for a form that flags an error before it is sent, for the phone menu or for a map. What can be done without a script is done without one. The page then loads quickly and works on a weaker connection.

7. Alternatives

Ready-made libraries and frameworks add many features at once. They suit applications, but on a company website they often mean hundreds of extra kilobytes. Plain JavaScript for a specific task tends to be smaller and faster.

8. Common questions

Does a site work without JavaScript?

The content does, if the site is written properly. Interactive elements such as dropdown menus need it to work.

Is JavaScript safe?

Code in the browser is safe as long as you do not load third-party scripts unchecked. That is why we keep the number of external scripts low.

Why is less of it better?

Every script has to be downloaded and run, which slows phones most. A fast site also sells better and ranks better.

If you need help with this, take a look at our Software development.

Related articles

Send us your web address.

In two days you get one page back.

Free, no obligation. We do not need access to any of your accounts.

How we handle your data

Matyáš Musela · 733 230 308 · Filip Berčík · 774 915 200 · aetheron@aetheron.cz · Prague

  1. What people in your trade actually search for

  2. How much of it reaches you today

  3. What we would do first, and why