Get Adobe Flash player

Search

Search this site for:


Related Links






Valid XHTML 1.0 Transitional

Valid CSS!





Get More Out of Your Tabbed Browser


Being someone that spends most of the day on the internet, I have often looked for ways to simplify and speed up my daily tasks on the web.


A few years back, I luckily stumbled onto the Mozilla browser. Needless to say, I am now totally hooked on the tabbed browsing features.


Background:


For those who are unsure about what tab browsing is, a tabbed browser allows you to open a new web page without having to open a new browser window. So, multiple web pages can be loaded in the same window making it easy to switch between different sites you find on the internet. When you're done surfing the web, you only have to close one browser window even though you are viewing multiple web sites.


Requirements:


This article will be most useful for those using the Mozilla Firefox browser. You can also benefit from it using Internet Explorer, but since I.E. doesn't support tabbed browsing yet, you will end up with multiple windows open on your desktop. If you have not yet tried Firefox, I highly recommend it regardless of whether or not you plan on reading this article. It's free and can be downloaded at http://www.mozilla.org


Let's Get Started:


In this article, I will explain how you can unlock additional tabbed browsing features built in the Firefox browser. Then, we will learn how to open multiple web sites with one click through the use of JavaScript. Finally, we will create your own personalized home page that provides quick access to your favorite sites.



STEP 1: Unlocking additional Tabbed browser features in Firefox



One difference I noticed between the current Firefox version and previous Mozilla releases is that by default, Firefox does not provide an option to make all external links on a web page open in a new tab versus a new window. After reading more at the Mozilla site, I found out that this option is available, but just needs to be unlocked. There are a couple of ways to unlock this feature. But, I find the quickest way is to do the following.


- With the Firefox browser window open, type (about:config) without the parenthesis in the address line where you would normally type a URL. This will list the main configuration parameters for the Firefox browser with their current values. Cool huh..?


- Scroll down the Preference Name list until you see browser.link.open_newwindow. Double click on this line. Change the Value listed in the text box from 2 to 3.



Now, whenever a link on a web page attempts to open a new window, the site will load in a new tab instead. Now it's time to take advantage of this feature. In the next step, you will learn how to open all of your frequently visited sites in one browser window with one click.


Note: You can also unlock this feature by creating a user.js file that will store additional configuration parameters.


More information on how to do this and additional tricks is available at http://www.mozilla.org/support/firefox/tips#beh_reuse


STEP TWO: Load Multiple Sites in Tabs Using JavaScript


Now that the browser settings are set to load all external links in tabs, we will begin creating a personal home page that will take advantage of this feature. To do this, we'll create a basic web page in html that will call on the use of a simple JavaScript. To start, create a new .txt file in Notepad.


If you are new to html programming for the web, don't worry. You can copy and paste the code examples below if you like. The page won't look fancy, but you can improve on it in your spare time. I've also created a code generator form to help with this article at http://www.4allgood.com/?mod=26 It will create all the necessary html code for you to view, customize, and use.



One neat feature JavaScript provides is the ability to open windows on the computer. Using JavaScript, we can open multiple sites with a single click. In this example, I will load some web sites that I frequent. On your page, just replace the links with your favorite sites, or use the code generator form to make your own links.


HTML/JAVASCRIPT CODE EXAMPLE:


<html>
<head>
<title>Personal Home Page for Firefox </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script>
var Engines = new Array (
"http://www.google.com",
"http://www.yahoo.com",
"http://www.ask.com"
);
var Classifieds = new Array (
"http://www.4allgood.com/adlandpro.php",
"http://www.4allgood.com/classifieds",
"http://www.4allgood.com/freeadposting.php"
);
var Finance= new Array (
"http://finance.yahoo.com",
"http://www.forbes.com",
"http://www.sharebuilder.com"
); function openPage (favorites)
{
for (i = 0; i < favorites.length; ++i)
open (favorites[i]);
}
</script>
</head>
<body>
<h1>A Sample Home Page for FireFox</h1>
<p><a href="#" onClick="openPage(Engines); return false;">Search Engines</a></p>
<p><a href="#" onClick="openPage(Finance); return false;">Financial News</a></p>
<p><a href="#" onClick="openPage(Classifieds); return false;">Online Classifieds</a></p> </body>
</html>


CODE EXPLAINED:


Using javascript, the links to each of your favorite sites can be listed in an array. Then, using the openPage function, we can open all sites in the array whenever a link is clicked. This is done by running the function as the onClick event occurs. The variable names can be anything you like. (ex. var Whatever = new Array) In the sample, I gave the variables a name according to the type of sites listed in the array.



The openPage function will find and load all of your favorite sites listed in the arrays. To call on the function, just enter the function name followed by the variable name. Ex.) openPage(Classifieds);


Once you have copied and pasted the above code, or the code issued by the generator form into NotePad, save the file as favorites.html.



STEP 3: Putting it all together into One Time Saving Feature



If you have followed steps one and two, you should now have a page that will allow you to open multiple sites in tabs with one click. You can easily add additional arrays, or edit the links contained in the arrays to include all of your most frequently visited spots on the web.



To get the best use out of your new favorites.html page, you can set it to be your home page. This way every time you open the browser, all of your favorite sites can be loaded quickly.



Here's how to set the home page in Firefox.



- With the favorites.html page open in your browser, click on Tools -> Options.



- Now, click the "General Options" icon located in the upper left corner of the Window


- In the Home Page Option section, click on the "Use Current Pages" button.



You now have your own home page with your favorite sites just one click away. I hope you found this to be as fun as I did to create. If you have any questions, or add-ons for this article, please feel free to contact me at my web site.


About the Author
Jon Schmedt is a freelance web designer who's motto is "on time, everytime". Visit one of his corners of the web at http://www.4allgood.com for articles tools, and tips for home and small business owners.