A customer opens your website and a small chat window offers help. You bought the service from another company; your web developer added it to the page. It looks like a modest addition. Behind it, however, may be a program supplied by that other company and run inside the customer’s browser. This is what people mean by a third-party script. 4

There is nothing inherently wrong with buying a useful feature instead of building it. The important point is that you are not merely displaying a supplier’s logo. You may be giving its software the ability to work inside your page. That makes the choice of where to place the chat just as important as the choice of chat supplier. 4

Your browser is the programme on your device that requests and displays websites. A page is not necessarily one finished picture sent by the supplier. It can arrive with text, images and instructions telling the browser how to react to your clicks. Those instructions are code; a short programme used for a page feature is often called a script. JavaScript is a common language in which these instructions are written. 17

Follow the chat example. Your browser asks your website for a page. That page tells it to obtain an additional script from the chat supplier. The browser receives that file and runs the instructions to create the chat button and respond when you open it. The supplier has not merely sent your developer a one-time description of the feature: its code is entering a customer’s visit. This sequence is part of the web supply chain, the collection of other software and services on which your page depends. 4

A program in the page can do more than look pretty

An ordinary script included directly in a page can interact with that page and the information available there. The exact reach depends on how it is connected. A separately contained embedded window with deliberate restrictions is a different arrangement from a script running as part of the main page. 4

The distinction matters because a browser can let a directly included script work with the main page even though another company supplied its file. In the chat example, the programme needs some access to display its button and accept a message. Depending on the integration, its technical reach may be wider than the visible chat box: information shown elsewhere on the page can also be available to it. A small rectangle on the screen is not itself a restriction on the programme behind it. 4

Think of inviting a contractor into your office. The relevant question is not only whether the contractor is reputable, but which rooms they can enter. The website equivalent is whether the feature runs on a public contact page, a signed-in customer page, or a page showing invoice details. Those places may contain very different information.

This does not mean every chat supplier secretly reads every field. Capability and observed behaviour are different things. It means the developer should understand what the integration can access and what it is intended to send elsewhere. OWASP identifies loss of control over changes, execution of another party’s code and disclosure of information as distinct risks of these integrations. 4

The supplier may also update the script without your team publishing a new version of the website. And some sites use a tag manager: a service through which authorized staff add or change analytics and other small programs. One included component can therefore lead to several suppliers’ code being loaded. The website developer is not necessarily the only person who can change what runs. 4

Suppose Monday’s approved chat file collects only a message that the customer deliberately sends. On Thursday the file at the same address changes. A visitor loading the new file can receive different instructions although your page still contains exactly the same link. The change might be a useful upgrade, a mistake or an unauthorized alteration at the supplier. A check of your own website’s changes would miss it. This is why knowing who supplies the file and who controls changes matters alongside whether the button works. 4

Approving one version instead of any future version

For some externally supplied files, a page can include a digital fingerprint of the exact content it expects. The browser downloads the file, calculates its fingerprint and checks the result. If it does not match, the browser refuses to execute that script or apply that stylesheet. The feature is called Subresource Integrity, usually shortened to SRI. 5

A digital fingerprint is a calculated value derived from the file’s contents. It is not a secret password that the chat supplier presents. In this arrangement your page supplies the expected value, and the browser calculates a value from the file it actually received. Unexpectedly changed contents fail the comparison. Downloading and allowing execution are separate steps: the browser needs the contents to check them before deciding whether to run them. 5

The important word is “match.” This check can detect that the file differs from the approved content. It cannot decide whether the approved content itself was sensible or safe. If your approved version collects information you did not want to share, a perfect match does not solve that problem. This limitation follows from what the check compares. 4 5

A legitimate update changes the file too. Someone must therefore review the new version and update the expected fingerprint where needed. 5

For an integrity check on a file from another web origin—a different base address—both sides have a job. Your page must ask the browser to request the file using CORS, its response-sharing mechanism. The supplying service must send permission for that access. Without this arrangement, the browser cannot use the outside file for this integrity-checked load. Ordinary outside scripts without this check do not all require the same permission. Adding a fingerprint is not a universal, maintenance-free repair for every external feature. 5

For example, a new approved chat version adds a useful opening-hours display. Because its contents changed, an old fingerprint can prevent it running just as it would prevent an unwanted alteration. The team must decide when to approve the new contents and update the comparison value. Copying the current fingerprint blindly would defeat the purpose: the review, not the act of calculating a value, is what establishes which version you intended to accept. The separate browser-sharing requirement is a technical prerequisite for checking external files, not proof that the code deserves your trust. 5

There is a further limit worth understanding without learning the technical details: checking the first script does not automatically check every other script it later fetches. Each additional component needs its own consideration. Likewise, absence of SRI is not evidence that a website has been taken over. It is a reason to understand how that particular dependency is controlled. 4 5

Sometimes the best change is where the feature appears

Return to the chat window. Does it need to appear while someone views an invoice, or could it sit on a separate support page? Could the customer still get help without placing the same external code alongside business records? These are design choices worth considering before arguing about technical settings.

Other approaches include keeping a reviewed copy of a script on your own service or limiting an embedded feature’s access to the surrounding page. Each has responsibilities: a local copy needs updates, and an isolated feature needs restrictions that actually match its purpose. The right approach depends on the component, not on a rule that every outside script is bad. 4

Limiting access may mean putting the feature into a separate page displayed in a frame, often called an iframe, and choosing restrictions on what it may do. This is not achieved simply by drawing a border around the chat. The developer has to select the appropriate separation and decide which information, if any, the main page deliberately passes to it. Likewise, keeping a local copy removes one supplier-controlled delivery route but does not automatically repair a flaw already present in that copy. Different choices address different parts of the dependency. 4

For an existing feature, ask your developer to explain which pages use it, what information it sends and how to disable it. A useful demonstration can use invented customer records in an approved test environment. You do not need another customer’s invoice or a public accusation against the supplier to understand the arrangement.

Finally, plan for the feature being unavailable. In our chat example, I would want invoice viewing to continue and another support contact to remain usable. Test that deliberately rather than discovering the dependency during an outage. The next time someone asks to “just add a small script,” discuss the pages and information it will touch before approving it.

Sources

[4] OWASP: Third Party JavaScript Management

[5] MDN: Subresource Integrity

[17] MDN: How the web works