There are three types of XSS attacks :
* Non-Persistent XSS attack : Here the data injected by an attacker is reflected in the response and has a link with the XSS vector
* Persistent XSS attack : The most harmful type of attack, where the script executes automatically the moment a user opens the page
* Document Object Model (DOM)-based XSS attack : An advanced type of XSS attack which happens when a web application writes data to the DOM without any sanitization