/    Sign up×
Community /Pin to ProfileBookmark

keeping the visitor on your site when linking to other sites

What is the best way to keep a web visitor on your site when linking to external sites? I use links within the text on occasion and am wondering what is the best way to allow them to visit the other site, yet not lose them. I know they can use the back button, but this does not seem like the best option since they may spend some time and travel quite a few pages away from the source page for the link. I also am not sure about using frames, since there seem to be some legal issues surrounding that??? Thanks for input. ?

to post a comment
Full-stack Developer

5 Comments(s)

Copy linkTweet thisAlerts:
@the_treeJun 12.2005 — [code=html]Check out this <a href="http://w3.org" target="_blank">other site</a>, and how it opens in a new window[/code]
Copy linkTweet thisAlerts:
@palmertiresauthorJun 12.2005 — Here is an example of the code I currently am using

<a href="http://w3.org" target="display" title="w3">link</a>

This does open the link in a new window, but if there is more than one link on a page, the new link will keep opening in the same window...it doesn't work smoothly. It seems if a new window is open in the background, the new link will open in that window, but generally stays in the background (not exactly what I want to have happening). Anyway, it's not consistent...sometimes the new window will open in the foreground.

Here is an example of a page with multiple links

[URL=http://www.home.earthlink.net/~aimeelmarshall/ideas.html]page with mutiple links[/URL]

I didn't change the code, yet, but am wondering what is the difference between "display", and what you have used, "_blank"?
Copy linkTweet thisAlerts:
@palmertiresauthorJun 12.2005 — ? Actually, my links page would be an easier example with less text to wade through...

[URL=http://home.earthlink.net/~aimeelmarshall/links.html]links page[/URL]
Copy linkTweet thisAlerts:
@the_treeJun 12.2005 — The only reason "display" is working at all is because the browser doesn't recognise it as anything else. So it creates a new window, which it identifies as "display". That is also why it opens the next document in that window.http://www.w3.org/TR/REC-html40/present/frames.html#h-16.3.2

If any target attribute refers to an unknown frame F, the user agent should create a new window and frame, assign the name F to the frame, and load the resource designated by the element in the new frame.[/quote]
Copy linkTweet thisAlerts:
@NogDogJun 12.2005 — Then again, you could give your visitors enough credit to assume they know how to use the Back button on their browser to get back to your site if they want to, instead of annoying them with unasked for new windows. If you feel you must open a link in a new window, have the courtesy to note this fact next to the link (or above a list of links).
×

Success!

Help @palmertires spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...