[sclug] Removing Browser Toolbars

David Given dg at cowlark.com
Mon May 15 17:20:46 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter Brewer wrote:
[...]
> I'm trying to remove the toolbars etc from a webpage I'm writing.  If I
> link to the offending page from my website that is of course easy e.g.:
> 
> <a href="javascript:window.open('mypage.html', 'toolbar=no foo bar blah
> blah')">Open a cool window</a>
> 
> But... if a user opens mypage.html directly from a bookmark or by typing
> the URL into their browser they are then stuck with the toolbar still. 
> Does anyone know of a method of removing the toolbar once the page is
> already open?

Short answer: please don't. It's horribly antisocial. The various bits
of browser furniture are there to make the user's life easier, and if
you try to fiddle with them, you're going to irritate your users.

Longer answer: you can't, portably. There are a number of tricks that
will work on some browsers, but a lot of browsers these days will flat
out refuse to honour your requests (because it's antisocial).

Even longer answer: unless you have very specialist requirements, you
almost certainly don't want to do this. In particular, wanting to use
Javascript merely to make a simple link work is a bad sign; it'll mean
that your web page won't work on browsers that don't support Javascript,
your accessibility will be bad (because software such as screen readers
won't know recognise it as a link), and search engine spiders won't
follow it. You'll also get screwed by anyone who uses a tabbed browser;
either the browser will force your popup into a new tab, so defeating
the whole purpose of the popup, or else it'll open a new browser window,
which the user explicitly doesn't want (because otherwise they wouldn't
be using a tabbed browser). On a more subtle note, doing that kind of
thing is a sign of a low-rent website --- it'll remind people of
Geocities and crappy typo squatters, which is probably not the kind of
association you want.

You may find this link interesting:

http://www.useit.com/alertbox/990530.html

- --
+- David Given --McQ-+ "Preacher, don't the Bible have some pretty
|  dg at cowlark.com    | specific things to say about killing?" "Quite
| (dg at tao-group.com) | specific. It is, however, somewhat fuzzier on the
+- www.cowlark.com --+ subject of kneecaps." --- Firefly, _War Stories_
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEaLhmf9E0noFvlzgRArrqAKDQVTE9VCfnUjXjmTroi9IXZQ4o4ACfeMzh
+DFC0nkQ0cxtjbfnovi/wSM=
=wg+z
-----END PGP SIGNATURE-----


More information about the Sclug mailing list