Newsletter "Behind the Scenes" Newsletter

September 2011The monthly newsletter by Felgall Pty Ltd

My Word

Educate, Don't Force

I find it quite amazing that there are still people asking for help in coding their web site so as to force certain pages to always open in a new window of a specific size. Such techniques used to be popular a decade or more ago but two developments make it completely pointless to take such an approach today.

Many years ago popup windows that just popped up by themselves became so annoying that all the browsers implemented popup blockers so as to only permit popup windows at all where the browser owner actually clicks on a link. The target attribute that allowed popup windows to be opened directly from links without requiring any JavaScript was deprecated (marked as obsolete and to be removed in the next version of HTML completely) when HTML 4 was released in 1997. Browsers have since implemented options allowing the browser owner to tell the browser to ignore any size or position information supplied when a web page tries to open a new window using JavaScript.

The other change was the introduction of tabbed browsers where you can have several web pages all open in the same browser window and swap between them just by clicking on the associated tabs. So n ow instead of opening a new page in a new window the browser owner also gets the choice of opening it in a new tab instead. With the options for being able to force the opening of a new window being blocked or removed in browsers there was no reason for them to implement a way for a web page to be able to specify that the page should open in a new tab.

The thing is that web browsers already give their owner the ability to choose where any new page opens and all that trying to force a page to open in a new window can achieve is to reduce the choices that the visitors to that site have with regard to where the page can be opened. The problem is that many of people using web browsers do not know what their browser can do. Web visitors can be divided into three groups when it comes to knowledge of their browser and the effect that trying to force a page to open in a new window will have on them. The first group are those who don't know how their browser works and where the web site can therefore succeed in getting the page to actually open in a new window so as to confuse many of those visitors and have most of them cursing the site owner for having opened an annoying popup (popups are annoying by definition if the browser owner didn't specifically request it). The second group are those who know a little of how their browser works who will curse the site owner even more for taking away some of their choices in where they can have the new page open. The third group are those who know a lot about how their browser works who will not even notice the attempt to force the page to open in a new window unless they view the page source and then they will laugh at the site owner for taking such a 20th Century and ineffective (to them) approach.

Instead of trying to force things that can't be forced, web site owners ought to be educating their visitors in how web browsers work as everything necessary for the browser owner to have web pages open how they want them to is built right into the browser. The problem is that most web site owners fall into the first group of browser users and don't know the first thing about how their browser works themselves.

To remedy this lack of knowledge about how browsers work to at least a small extent I am going to explain here how the browser navigation options work so that you at least (and whoever you share this newsletter with) will know at least enough to put you in the second group of browser users rather than the first group.

The first thing to realise is that left clicking on a link in a web page is not the only thing you can do with that link in order to navigate to the page it links to. If you right click on the link instead of left clicking then the context menu for the link will appear. This menu gives you far more choices as to what you can do with the web page the link attaches to than the site owner could possibly offer in any other way. You can select to open the page in the current tab in the current browser window, you can select to open it in a new tab in the current browser window, you can select to open it in a new window, you can bookmark the page without opening it, you can copy the address of that page so as to be able to paste it in some other program, and you can even select to save the page onto your computer rather than opening it.

You don't even need to use the mouse in order to interact with a link on a web page. You can use the tab key on your keyboard to step through all of the elements in a web page that you are allowed to interact with including all the links. The element that currently has the focus as far as keyboard operations is concerned will be marked in some way (usually by having a dotted outline around it). Pressing the enter key on the keyboard produces the same action for the link that has the focus as left clicking on it with the mouse does. To access the context menu for that link from the keyboard instead you simply press the context menu key on the keyboard. For those of you who didn't even realise that your keyboard has a context menu key, it is the key toward the bottom right of the main section of your keyboard somewhere between the alt and ctrl keys and it usually has a picture of a drop down menu with a mouse cursor over it on the key.

Simply knowing the things in the last two paragraphs moves you from a group one browser user into group two. To move to group three means going into the option settings for your browser and configuring the browser defaults so that you can control what sorts of links open where when you left click on them. Just how you do this depends on which browser you are using. In some cases you may need to install a plugin or extension of some sort in order to be able to get full control of how your browser opens web pages. If you have been using a browser that doesn't even provide an extension to take full control of where links open then you may want to consider switching to using a browser that does.

The ability of web site owners to force pages to open in a specific way are long gone. That there is anyone who still sees the page open the way that the site owner wants is simply due to the fact that there are still many people who don't know how their browser works. A web site will be far more effective in the long term at getting people to open their pages in a new window or tab if they educate their visitors on how to use the options already built into their browser to perform these functions.

On Site

Lots of things to report on this month. First this month marks the tenth anniversary of this newsletter. I have sent one newsletter every month for the past ten years making this my 121st newsletter. Next month sees the 11th anniversary of the web site (although it didn't actually move to that domain until about three years later). Also seven years ago this month I commenced supplying the content for and at the end of last month I ceased providing that content.
A couple of weeks ago I started creating a new JavaScript web site of my own and have been using up just about all of my spare time this month on creating enough content to launch the site. The new site is and as readers of this newsletter you are amongst the first to get a look at this new site. The intention of the site will be to provide a way for JavaScript beginners to be able to learn how to write modern JavaScript and for those who have been writing JavaScript for a while to be able to modernise their scripts. Each of the pages on the site will include example code to show exactly how to write JavaScript properly and many of the pages will have complete scripts that resolve cross browser issues. Once all of the initial pages have their initial content written and added, I will look at adding further pages as well as expanding the existing pages with yet more related information. The idea is for this site to provide everything people need to know to write modern JavaScript. I see too many sites that still use and even teach outdated approaches JavaScript. I have been creating the site in a rush because I have another JavaScript class listed to start at the Community College in a few weeks time and I don't want to be promoting the web pages I have been using for that course on when those pages will probably now be taken down some time in the next few months.

What's New

The following links will take you to all of the various pages that have been added to the site or undergone major changes in the last month.

Main Links

Ask Felgall
Past Newsletters
Sign Up/Unsubscribe
Question Forum


Interactive Web
PC Software
Comms Software
Word Processing
Book Reviews

Other Links

My Javascript Site
My Blog