Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

target=_new or not?

Engaged ,
Jul 19, 2018 Jul 19, 2018

I forgot: When sending the site visitor to an off-site link via"<a href- . . .", etc., is it best to add the qualifier "target=_new", to be sure the user returns to the page she started from? My intuition says "Yes, use it" (otherwise you depend on visitor's remembering to use the 'back' arrow on browser), but I would like a confirmation from one of you.

Or, maybe I just answered my own question (?).

Best,

jwc

1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 19, 2018 Jul 19, 2018

First there is no reliable method of detecting if it is a mobile device or not anymore. Smartphone screens are now into the standard tablet size domain in landscape mode, and 'pro' tablets are more the size of laptops.

Tablet devices themselves are also a big question mark. I prefer a new tab when using a tablet device, but only if the subject matter is external to the site and reference material. If it is a link to something within the site I prefer it to replace the current page.

I think for mos

...
Translate
LEGEND ,
Jul 19, 2018 Jul 19, 2018

Two schools of thought on this -

The first agrees with you, use it.

The second, users on mobile devices do not like another tab opening.

Take your choice, but remember mobile usage now exceeds desktop/laptop.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 19, 2018 Jul 19, 2018

Well,that is interesting indeed. First off, I do all my testing on desktop system, bu clearly need to capture the OSX community of users. Two questions:

1 - How ‘mobile’ is a tablet?

2 - Could you point me to a script that I can embed in the home page header, which detects the size of device being used by the site visitor, so that I can program the links accordingly?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 19, 2018 Jul 19, 2018

First there is no reliable method of detecting if it is a mobile device or not anymore. Smartphone screens are now into the standard tablet size domain in landscape mode, and 'pro' tablets are more the size of laptops.

Tablet devices themselves are also a big question mark. I prefer a new tab when using a tablet device, but only if the subject matter is external to the site and reference material. If it is a link to something within the site I prefer it to replace the current page.

I think for most people opening a new tab will depend on the relevance to the referring page/article.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 19, 2018 Jul 19, 2018

Perfect; that is exactly what I’m doing now: ‘_new' only for links external to my site.

From what I have heard from all of you, I’ll stay with the above.

Tbanks,

jwc

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 19, 2018 Jul 19, 2018

In case you missed the memo, target="_new" is deprecated.  See current target attributes below.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 19, 2018 Jul 19, 2018

OK, will change from _new to _blank, thank you; unaware of the deprecation.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 19, 2018 Jul 19, 2018

Ok, thank you (correct reply too!).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 19, 2018 Jul 19, 2018

target="_blank" is what I use to force a new browser window / tab to open on desktops.  But it does not work on mobile devices which open links in the parent window.    The Back button is disabled in a new window / tab.  So users must close it.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 19, 2018 Jul 19, 2018
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 19, 2018 Jul 19, 2018

I feel like I have opened a can of worms. Your links refer to “target = blank”, which I stay away from, have never used. I’m asking about ‘target=new”.

Best,

jwc

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 19, 2018 Jul 19, 2018

Target blank, target new, basically same thing with different names.  If you _are_ going to use them, read the articles and get a better understanding of what you are doing.  The first one points out a vulnerability that you should at least be aware of.

V/r,

^ _ ^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 19, 2018 Jul 19, 2018

What i'm learning from your first ink is that the following qualifier should be added to all of my external links (I have 28 of them on my home page; perhaps more to follow):

    rel="noopener noreferrer"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 19, 2018 Jul 19, 2018

If you are using an IDE like DreamWeaver, then adding that to 28 links should be easily accomplished with find/replace.

V/r,

^ _ ^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 19, 2018 Jul 19, 2018

Right, no problem to that.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 19, 2018 Jul 19, 2018
LATEST

Regarding your second link, (a) I'm clueless in all things JavaScript and (b) the thread is almost 10 y. o., and contains a lot of controversy about the right approach.

In each <a href entry, I'll change from _new to _blank, and add rel="noopener noreferrer".

Thanks,

jwc

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines