Close search results
Close search results
RequestPolicy logo.

Prevent JavaScript Redirect in Firefox

Hero Add-on of the day

I recently set up a simple web page using the "click-and-play" CMS Jimdo recently, but realized today that the URL I chose for my site could have been better. I decided to set up another page with a new URL and redirect to it from the first site.

As a first attempt, I tried a simple Javascript approach, using a random test URL which pointed to nothing: <script type="text/javascript">
document.location = "";
This worked. However, Jimdo is a quite WYSIWYG-oriented CMS, and needs to show the web page in order to edit it. Trying to edit the original page now sent me directly to the test URL instead! Disabling Javascript did not help either, since it broke the CMS interface. Nice catch-22. I was stuck with a broken page.

The solution: RequestPolicy! This Firefox plugin warns you when a site attempts a Javascript redirect and lets you prevent it from happening, without breaking any other Javascript code. After installation, I just opened the page, the redirect was prevented, and I could edit the page again - like correcting the URL.

That said, a Javascript redirect is less than ideal. If you can, use a 301 redirect (Google it) whenever possible.

Patrick Horn

I had exactly the same problem with Jimdo .... thanks for the tipp with the AddOn!!! (Didn't found it with the Firefox AddOn Search).

But after trying it one time (and the message to deny appeared), it did not work the second time. Don't know why. I didn't added any permanent rules. I had to change the rule setting of the AddOn from "domain" to "host", then allow 2 internal links of Jimdo to be able to use the editing functions of the CMS, then it worked ... and I could delete my redirect-code ...


Thanks for your comment and the additional info! Glad to be of some help. :)


Thank you! Your topic was very useful. i had exactly same problem with Jimdo.

Leave a comment

This will just take a second.

Submitting your comment...
Page Theme: Dark / Light
Erik Moberg  2024