A client-side script is code that runs in the user’s browser after a page loads, most often JavaScript. Unlike server-side code, it executes on the visitor’s device and can alter the page in real time: hide or show fields, fetch more content, redirect to another site, validate input, or trigger actions when a button is clicked or a timer expires.
In cyber security, client-side scripts matter because they can make a malicious page behave differently from what a static scan shows. Phishing kits often use scripts to delay the lure, fingerprint the browser, swap domains, or reveal a credential form only after interaction. Defenders look for these behaviors in sandboxed browsers, page source, network requests, and DOM changes. Blocking or inspecting risky scripts can help stop credential theft, redirect chains, and drive-by payload delivery before a user submits data.


