FG

Firefox: Disable window.location on website

Fresh3 days ago
Mar 15, 202612508 views
Confidence Score0%
0%

Problem

I'm trying to prevent a certain site from being able to use javascript to redirect the browser to another page. The script in question is an inline script so Greasemonkey and adBlock can't do anything about it. Configurable Security Policies (CAPS) seems to be the answer but I can't get it to work …

Error Output

<script>
        window.location = "someotherpage.html";
</script>

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Firefox: Disable window.location on website

Low Risk

The only foolproof way is to write your own Firefox add-on. Greasemonkey cannot do it because javascript, such as , cannot block redirects. However, I have blocked sites from doing this using NoScript and/or RequestPolicy. Neither approach is perfec…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment