How to temporarily disable XSS protection in modern browsers for testing?

richardkmiller picture richardkmiller · Oct 17, 2012 · Viewed 86.9k times · Source

Is it possible to temporarily disable the XSS protection found in modern browsers for testing purposes?

I'm trying to explain to a co-worker what happens when one sends this to an XSS-vulnerable web form:

<script>alert("Danger");</script>

However, it appears that both Chrome and Firefox are preventing the XSS popup. Can I disable this protection so I can fully see the results of my actions?

Answer

Zachary K picture Zachary K · Oct 17, 2012

In Chrome there is a flag with which you can start the browser. If you start the browser with this flag, you can do what you want:

--disable-web-security