SHARE
Facebook X Pinterest WhatsApp

So, You Want A New Browser Window, Huh?

Written By
thumbnail
Joe Burns
Joe Burns
Jan 4, 2005


Use these to jump around or read it all…


[Why Would I Do This?]

[Here’s What Does It]

[How Do I Stop It From Happening?]


     Did you see that? A new browser window opened up! You now have two windows open at the same time. Really! Look up at the “BACK” button at the top of the page. It isn’t available to you. (Except on some higher-level browsers.) That’s because you’ve started a whole new browser session.


Why Would I Do This?


     

I receive at least one letter a day asking for info on how this is done, so I put a quick tutorial together. The benefits are best used when you are demonstrating something and need two windows. You can also open other sites while keeping the user in your site. These are other uses of course, but those are the two I am most font of. Now, here

s what you get:


  • The new browser window is fully operational, but is not attached to the window that it came from. There are no “back” capabilities. (Except on some higher-level Explorer browsers.)
  • The way to get back to the page below is to close the top-level window. In windows 3.x, choose “CLOSE” under the FILE menu in the top left hand of the browser. In MAC and W95, hit the button in the upper right-hand corner.
  • If you choose “Exit,” you’ll close the browser altogether. You don’t want to do that.




Here’s What Does It


<A HREF=”http://www.site.com/page.html”
TARGET=”resource window”>
Text Text Text</A>



 

     See that TARGET=”resource window” above? That’s what does it.





How Do I Stop It From Happening?


     

I also get letters stating that a client-side image map or a frames page is causing a new window. Some people want to get rid of it. Try this:


<A HREF=”http://www.site.com/page.html” TARGET=”_top”>
Text Text Text</A>


     Notice I targeted the link to the top of the page. This is the default in HTML. Not putting it in has always resulted in an A HREF link jumping to the top of the same browser window. In order to stop the new window from popping up, you now need to force the browser’s hand. Please notice the underline mark before the word “top.”



     Now, go and use the commands for good, not evil. They are yours to exploit at your own will. To get back to the HTML Goodies Page, you can either Click Here, enter “/index.html” above, or close this window. If you get a dialogue box that asks Close all windows and exit? click No, go back and choose “close,” not exit.

     My suggestion would be to close this window altogether. You’re taking up precious memory running two windows.

 


[Why Would I Do This?]

[Here’s What Does It]

[How Do I Stop It From Happening?]

Recommended for you...

Best JavaScript Frameworks & Libraries for Building Web Dashboards
Rob Gravelle
Jul 29, 2021
Google Web Vitals for Beginners
Diogo Souza
May 4, 2021
Web Site Maintainability
Vince Barnes
Jan 10, 2021
Getting Started with Grunt.js
Diogo Souza
Oct 8, 2018
HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.