What JavaScript does on a typical website
Think of a web page as three layers: HTML defines the content, CSS the look, and JavaScript the behavior. Without it, a website is just a set of static pages where every action requires a reload.
Typical JavaScript tasks on corporate websites and online stores:
- catalog filtering and sorting without reloading the page;
- a cart that updates instantly when a product is added;
- price calculators, configurators, color or size selection that updates the photo and price;
- form validation, phone number masks, hints while typing;
- sending events to analytics: what a visitor clicked, which form they started filling out.
Plain JavaScript, jQuery or a framework
Plain JavaScript today can do everything jQuery was once added for: finding elements on the page, handling clicks, sending requests. For interactive blocks on a website, it's the lightest and fastest option.
jQuery is a library that simplified JavaScript work for many years and still runs on a huge number of websites, including WordPress themes and OpenCart templates. We don't recommend it for new projects, but we're also in no hurry to rewrite working code just because it's "old."
Frameworks like React or Vue are needed when the interface is complex and has many interdependent states. For a slider and a contact form, they're overkill.
Benefits of JavaScript without heavy libraries
- Speed. The browser loads and runs only the code it needs, so the page becomes interactive sooner.
- Works with any CMS. A script can be embedded in a WordPress, OpenCart or custom-built site template without changing the architecture.
- Fewer dependencies. No risk of a library being abandoned or conflicting with others.
- Easy to maintain. Any frontend developer can understand the code without learning a separate tool.
Limitations and common problems
- Complex interfaces are hard to keep organized. When a page has dozens of linked elements, code without a framework turns into a tangled mess of event handlers.
- Old jQuery versions and plugins have vulnerabilities. Some popular plugins haven't been updated in years, and over time that becomes a security risk.
- Script conflicts. Older websites often load several jQuery versions at once, or plugins that override each other's behavior.
- Errors fail silently. A broken script can quietly disable a contact form or a buy button, and the owner finds out from falling sales.
When to switch to other tools
If your website is gradually turning into a service — with user accounts, complex forms and lots of data — plain JavaScript is no longer enough. New parts are then better built on a framework, and for code that keeps growing and is worked on by several developers, consider TypeScript: it helps catch errors before the code runs.
How we handle legacy jQuery code
A jQuery website isn't a death sentence. We don't suggest rewriting everything from scratch; we work in stages:
- first we upgrade jQuery to a supported version and remove duplicate copies of the library;
- we replace plugins with known vulnerabilities or ones that haven't been updated in a long time;
- we fix bugs that get in the way of sales and inquiries;
- we rewrite the most frequently changed parts in plain JavaScript;
- we leave the rest as long as it works reliably and causes no problems.
This approach costs less than a full rewrite and avoids the risk of breaking the site with one big update.
Third-party scripts and page speed
Often a website is slow not because of its own code but because of third-party services: live chat, several ad pixels, a reviews widget, maps, trackers. Each loads its own JavaScript, and together they can outweigh the website itself.
We check which services are still in use, remove the unnecessary ones and defer the rest so they load after the visitor sees the main content. We set up analytics events through Google Tag Manager so marketers can add them without touching the code. We cover the technical side of data collection in more detail on our analytics setup page.
Security and cross-browser support
Every visitor can see the code running in the browser, so anything important — prices, discounts, access rights — we always validate on the server, not just in JavaScript. Otherwise a savvy user could change the order total right in the browser.
A few more rules we follow:
- we never insert user-entered text into the page without sanitizing it, so no one can inject a malicious script through a form field;
- we don't store access keys for paid services in the code;
- we check how the page behaves if a script fails to load: the main content and the contact form must stay available;
- we test in the browsers your visitors actually use, based on analytics data.
What affects cost and timeline
- Scope and complexity of interactivity: a single calculator or a full configurator with dozens of options.
- Condition of existing code: number of scripts and plugins, jQuery versions, conflicts.
- Server communication: whether data needs to be sent and received, and whether backend endpoints already exist for it.
- Browser support requirements and devices.
- Number of third-party services to integrate or optimize.
We estimate small tasks right after you describe them; for older websites we start with a short script audit.
Frequently asked questions
Do we have to drop jQuery completely? Not necessarily. If the library is up to date, free of vulnerable plugins and doesn't hurt speed, it can stay and be replaced gradually.
Why did our form stop working when nobody changed anything? Most often it's an update to the CMS, a plugin or a third-party service that caused one of the scripts to stop working. We look for errors in the browser console and fix the root cause.
Can you add a calculator or configurator to our existing website? Yes. We build it as a separate block that's embedded in the page and doesn't affect the rest of the site.
Will script optimization improve our search rankings? Page speed is one of the signals search engines consider, and it directly affects visitor behavior. But rankings depend on many other factors too, so don't expect miracles without work on content and structure.
Do you support websites built by other developers? Yes, as part of our website support services: we fix bugs, update libraries and add new features.
Why Promodex
Since 2015, the Promodex team has worked on 750+ projects, so we've seen websites in every possible condition — from brand-new to ones that have been accumulating scripts for years. Promodex has 30+ team members — frontend and backend developers, marketers, SEO specialists — and we don't use subcontractors, so code changes are coordinated with analytics and SEO. We tell you straight what's worth rewriting and what's better left alone, and we keep looking after your website after launch.