|
Web Development & Graphic Design Problem Solving for Graphic Design, PHP, ASP, Perl, MySQL, SQL, XML, HTML issues |
|
Topic Tools |
#1
|
|||
|
|||
Which should I use?
I've got an HTML question.
I want to make a link open in a new window (or tab if that's how the browser is configured) instead of in the same window/tab. I have heard from some people who say use target="about:blank", while others say use target="_blank". Which one should I use? Also, on another note, is it possible to force it to be a new tab instead of a new window (or force it to be a new window instead of a new tab), based on what target I use? I wonder because although I have my browser set for opening new windows as tabs instead of windows, some popup/popunder ads still show up as separate windows on my browser (not new tabs). I wonder what target they are using to force a new window, instead of a new tab, or are they using something more advanced than HTML, such as PHP or Javascript? |
#3
|
|||
|
|||
Just use target="_blank" in the anchor tag. I'd suggest NOT trying to control windows vs tabs.
Unless your goal is to be obtrusive to users, using target="_blank" will open a new tab or window based on how the user has their browser configured. Overwriting user setting is nothing more than annoying to users. |
#4
|
|||
|
|||
Quote:
On my version of Firefox, both of those open a new tab; neither opens a new window. However on my version of IE, both of those open a new window; neither opens a new tab. What's up with that? I had a reason to use different targets though. My plan was: Links to other pages on my site, where those pages have links to go back to the previous page, would use a target of the same window and same tag. Links to other pages on my site, where those pages do not have links to go back to the previous page, would produce new tabs so one can go back to the previous page by simply closing the new tab (or switching back to it if they didn't want to close it). Links to pages of other websites would have a target of a new window to make sure everybody knew it was not part of my site, and could minimize the other window (not even close it if they didn't want to) and have the 3rd party web window out of view allowing them to continue browsing my site without having to think about that other site (of course if they wanted to they could always un-minimize the window and continue to view the third party site). It's all about making sure my viewers stay on my site for as long as possible without leaving my site even if my link takes them off my site (and hopefully delay them switching to browsing the other site for a few minutes by keeping their mind on my site, again increasing my site view time, even if my link took them to that site). It's all about the psychology of person visiting my site. And the more my site is viewed and the longer it's viewed, the more likely it is to show up on some internet statistics site as popular. And of course search sites like Google use that statistic to help determine relavence of a site to a given set of search words, helping me get my site (if I'm lucky) onto the first page of Google if one searches for the words "anime" or "video games". Remember search engines bots crawl the net for not only websites directly, but also (if I'm correct) for sites carrying internet statistics. When stat sites are found, the bots systematically download that statistic data to Google's servers, which helps improve the Google search service. My site is currently under construction. Though it can be viewed at my IP address 76.104.145.19 (type or copy that IP address into your URL bar to view). Last edited by Ben321; July 10th, 2011 at 06:28 AM. |
#5
|
|||
|
|||
Every single page of your site should be viewable in the same window/tab.
Every one. Imagine... you go Walmart to look at electronics.... You walk in... walk past the furniture and look around as you pass.... walk pass the toys and look around... arrive at the electronics section and the employee there tells you "Oh, you need to go to the building next door to look at electronics. It opens it's own "container" or warehouse." See how silly that would be? No web site should ever open more than a single window or tab. This includes pop ups anymore as well. With tools like jquery, there's never any reason for a separate DOM object. |
Bookmarks |
«
Previous Topic
|
Next Topic
»
Topic Tools | |
|
|
All times are GMT +1. The time now is 01:39 AM.