Can XSS be prevented without modifying the source code? Technology Community › Category: Web Security › Can XSS be prevented without modifying the source code? 0 Vote Up Vote Down VietMX Staff asked 4 years ago Set-Cookie: HTTPOnly attribute can also be used to prevent XSS.