XSS You need to define several steps in a flowchart that show how your system works and prevent XSS attacks. For instance, is user input validated in Javascript? If yes, go POST request; otherwise, the error returned to the user with a prompt to correct and resubmit the information on the web page.