# Preventing XSS Attacks

DevFeed: [Preventing XSS Attacks](<https://devfeed.tech/articles/preventing-xss-attacks-29979.md>)

Original publisher: [Read original article](<https://goteleport.com/blog/xss-attacks/>)

Author: info@goteleport.com (Russell Jones)

Published: 2021-02-23T00:00:00Z

Content type: article

Language: en

Sources: [Teleport](<https://devfeed.tech/sources/teleport.md>)

Topics: [XSS](<https://devfeed.tech/topics/xss.md>), [Security](<https://devfeed.tech/topics/security.md>), [browser](<https://devfeed.tech/topics/browser.md>), [Document Object Model (DOM)](<https://devfeed.tech/topics/dom.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [API](<https://devfeed.tech/topics/api.md>), [Cookies](<https://devfeed.tech/topics/cookies.md>), [HTML](<https://devfeed.tech/topics/html.md>)

Tags: [attacks](<https://devfeed.tech/tags/attacks.md>), [browser](<https://devfeed.tech/tags/browser.md>), [code](<https://devfeed.tech/tags/code.md>), [cookies](<https://devfeed.tech/tags/cookies.md>), [html](<https://devfeed.tech/tags/html.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [security](<https://devfeed.tech/tags/security.md>), [xss](<https://devfeed.tech/tags/xss.md>)

## AI overview

This article explains cross-site scripting (XSS), how browser security mechanisms such as the Same-Origin policy, the DOM, JavaScript, and cookies shape web isolation, and why dynamically generated sites that mix code and user-controlled data are difficult to secure. It introduces XSS attack examples and mitigation concepts.

## Source excerpt

Understanding Cross-Site Scripting (XSS) and Its Mitigations.