Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

JavaScript executed through address bar is not working in Firefox 7, 8. For example, the code below works in Chrome, when I paste it into the address bar and press Enter:

javascript:alert("hello world!");

In the latest Firefox, it's not working. Why? How can I make it work?

share|improve this question

migrated from Nov 14 '11 at 21:27

This question came from our site for professional and enthusiast programmers.

What is your practical application of that feature? –  Šime Vidas Nov 14 '11 at 14:56
You can find answer here. –  Rizwan Nov 14 '11 at 14:56
i cant find any solution from your url –  Vishnu Dina Nov 14 '11 at 14:58
i just need to run javascript through adress bar –  Vishnu Dina Nov 14 '11 at 14:59
From that URL: "Starting in Firefox 6 javascript in the url-bar runs with a null security principal for security reasons. This means it's almost disabled. You need a bookmarklet or an add-on for a workaround." –  Quentin Nov 14 '11 at 15:00

2 Answers 2

It's a security issue. Other browsers will follow this restriction...

Use firebug instead ;)

share|improve this answer

If you want to execute javascript from url, then you have to use like this:

let's say, you have site: then in post.php, insert:

if (!empty($_GET['action']) && $_GET['action'] == myfunction ){
echo '<script>alert("Hi User");</script>';

after that, when you enter:

then the script will be shown.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.