There has long been a controversy between those who think that all links leading offsite should open in a new window, and those who think they should open in the same window. I maintain that this is not a real controversy.
What is the "controversy"?
Usually, but by no means always, those wanting to open a link in a new window are the owners of the website, and those in favor of using the same window are standards-supporting web designers.
Website owners are fearful of losing their viewers to another site. If clicking a link causes a new website to appear in the same window, then the viewer must take positive action to return to the original site. Even though there is no evidence that I know of to support viewers not coming back, owners are reluctant to take a chance on losing possible sales.
Web designers are often against using a new window since the W3C, which attempts to set web standards, has declared that the target attribute used to open a new window is no longer allowed.
And the viewer does indeed have two easy ways to come back to the original site. He can use his BACK button to return. Or he can right-click the link and choose to open a new window himself.
Why is this "controversy" spurious?
As I understand it, the W3C banned the target attribute because HTML is not supposed to concern itself with anything but WHAT is shown in the browser window. The HOW and WHERE aspects of a web page are governed by other systems.
CSS dictates HOW web page information is shown. And everything else is done through the DOM. Therefore, what happens when a link is clicked is rightly the province of scripting.
This is why there should be no controversy. If the site owner wants offsite links to open in a new window, then the web designer can do so by using scripting. This will not violate the "strictness" of the W3C, and the webpage will validate. See the paragraph below for an easy way of accomplishing this.
What is the "controversy"?
Usually, but by no means always, those wanting to open a link in a new window are the owners of the website, and those in favor of using the same window are standards-supporting web designers.
Website owners are fearful of losing their viewers to another site. If clicking a link causes a new website to appear in the same window, then the viewer must take positive action to return to the original site. Even though there is no evidence that I know of to support viewers not coming back, owners are reluctant to take a chance on losing possible sales.
Web designers are often against using a new window since the W3C, which attempts to set web standards, has declared that the target attribute used to open a new window is no longer allowed.
And the viewer does indeed have two easy ways to come back to the original site. He can use his BACK button to return. Or he can right-click the link and choose to open a new window himself.
Why is this "controversy" spurious?
As I understand it, the W3C banned the target attribute because HTML is not supposed to concern itself with anything but WHAT is shown in the browser window. The HOW and WHERE aspects of a web page are governed by other systems.
CSS dictates HOW web page information is shown. And everything else is done through the DOM. Therefore, what happens when a link is clicked is rightly the province of scripting.
This is why there should be no controversy. If the site owner wants offsite links to open in a new window, then the web designer can do so by using scripting. This will not violate the "strictness" of the W3C, and the webpage will validate. See the paragraph below for an easy way of accomplishing this.
About the Author:
Visit the author's website, Professor's Coding Corner for some useful code snippets and tutorials on various aspects of web programming. In particular, there is some simple open new window code that will satisty strict web standards. You can get a unique content version of this article from the Uber Article Directory.
No comments:
Post a Comment