Title Bar with the URL in a Firefox Pop-up

Thanks to intrusive advertising, we sometimes forget that the browser pop-up functionality can actually be useful. In this particular case, I was playing with the Notify New Mail Popup plug-in for SquirrelMail the other day and I came across an interesting “feature” of Firefox.

First of all, the purpose of this plug-in is to allow you to pop up another small window that periodically refreshes. When you get new mail it changes the title bar of the window to say “Email” (otherwise it says “No Email”, brilliant, I know.) This is really nice to have sitting in your taskbar so, at a glance, you know if you have new mail. This actually works just fine with IE, but with Firefox, it displays the URL of the window, followed by the window title.

New mail notify title in Firefox

As you can see, this is a problem if I want to know if I have new email.
Depending on your perspective, you can look at this as a bug or a feature. It’s a bug in the sense that the browser is modifying the page’s <TITLE> tag and pre-pending the url. It’s a feature because this window doesn’t have the location bar showing, therefore it puts the URL in the title for you.

Looking into the code, the plugin uses an anchor with a window.open javascript command:

ONCLICK="window.open('../plugins/notify/notify.php',
'emailnotify','width=250,height=80')"

To “fix” this particular problem, I added the “location” modifier.

ONCLICK="window.open('../plugins/notify/notify.php',
'emailnotify','width=250,height=80,location')"

Fixed new mail notify title in Firefox

This makes the window taller by adding the location bar, but it also removed the pre-pended URL from the title.

I’m sure this “feature” causes problems in other similar web applications. I’m curious to know if anyone else has found another way around this.

Maybe this should be a customizable setting in the user.js file for Firefox?

Advertisements
This entry was posted in General, Website. Bookmark the permalink.

12 Responses to Title Bar with the URL in a Firefox Pop-up

  1. Luc says:

    I feel the same about this “feature” (more a bug IMO).
    I found your blog entry by searching how to turn off that…

  2. Luc says:

    I search around and I have found how to turn on the feature.
    Go to the about:config page and turn off dom.disable_window_open_feature.location

    Restart firefox, that should do the trick!

  3. Jonathan says:

    I think it’s a bug, too. We should be able to disable the URL in the title bar when we don’t want it.

    As for the trick explained above, it sure remove the URL from the title bar, but it also put back the location bar… I’d very much like to find a way to remove *both* !

  4. Jared says:

    It’s a feature to prevent website from spoofing windows dialog prompts and such.

  5. CK says:

    I also ran into the same problem. In IE we can turnoff this feature, by adding the site as trusted.

    I did not find a way to do this in FF.

  6. Oink! says:

    I also found this page looking for a way to get rid of the URL on the title. IMHO it’s a bug.

  7. Ole Olafson says:

    I found a way to disable the URL in the titlebar. Thus it is important to know that this means to open a security hole, as it enables malicious sites to hide their address when opening a popup-window!

    IMHO this is not a bug but a feature, but it should be able for the experienced user to change this behaviour.

    There is an extension called “Titlebar Tweaks” which can be found here:
    http://www.cosmicat.com/extensions/titletweak/

    The version provided there is only compatible with Mozilla Firefox 0.9, 1.0, and Deer Park Alpha 1, but there is a patched version at http://btcorp.dyndns.org/Tools/FireFoxExtensions/ that will (and does) work with 1.5

    What is does ist to allow the user to customize the titlebar, thus as modifying the displayed browser name and the order in which page title and browser name are displayed. BUT it also removes the URL in popup windows with the feature location=no set!

    So, if you’re really sure you want to hide the URL and need a tiny window without location bar, just install this extension and chose to display the title only – this will bring you the most tiny browser window with only the information showed that you want to show – as is very useful if you work with or code browser based applications, e.g. when displaying any information on the titlebar wich should be readable when the window is minimized (like counters, notifications etc.)

    Hope it helps! i’ve been searching two days to find this 🙂
    Have fun-

  8. Pingback: Web Things Considered » Firefox 2 takes new measures against popups

  9. Andy says:

    I was also looking for a way to get around the title prefix in popups.

    Thanks for providing the solution, although the location bar is annoying, I believe it is actually forced in IE7 anyway, which doesn’t provide a prefix.

    Clearly an attempt at a security feature but also very annoying. I think i’ll live with the location bar though.

  10. I have been trying to figure this out for quite some time and I just did a google search and came here. It might be a feature, but I hate it. The URL could be placed after the title, after all, if you define a title you want that title to show not the URL. I understand the security issues, but showing the URL is NOT a solution, in a tiny window (and that’s what the … bad sites will open), the URL will not show anyway. Maybe http:// will show if even that.

  11. intranet developer says:

    This bug(!) in FF will most likely remove Firefox completely from the list of accepted browsers in the company I am currently working for. It is a bug because, as stated above, it changes a variable the developer has set.
    I am developing intranet applications. We can NOT make the users install any plugins (which is rediculous as a fix for a bug in the main application anyway). Users can NOT browse the internet, so this so called “security feature” falls back to a pure pain in the ass.

    IE 7 does not show this behaviour, so I guess it’s IE 7 instead of Firefox for about 800 users from now on, if I do not find a reliable way to stop Firefox from invalidating data.

  12. Jeff says:

    Prolly a huge security issue so do at your own risk!!! I found that if you edit browser.chromeurl in about:config to: chrome://browser/content/location=no set it takes out the url in the title bar.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s