0

I want my website's browser tab to be brought to front, when it is referenced by a hyperlink, regardless of any browser setting that may forbid this behaviour. I am aware that this is potentially a bad (or at least annoying) thing, however, my users are not allowed to change their browser settings (due to company policy) and are confused that apparently nothing happens, when they hit a hyperlink that references my website (although the existing tab is correctly updated of course but remains in the background).

There is one more constraint: Closing and reopening the tab is not an option, it must remain open as most hyperlinks will just add an anchor to the existing url which does not require a reload of the website.

I am open to any virtuosic HMTL or JavaScript tricks if there are any ;-)

Sir Hackalot
  • 521
  • 6
  • 16
  • I don't understand what you want to do. Do you mind explaining company policy a bit more? What can a user do, what should they do and what do you want to do? – ProblemsOfSumit Feb 11 '15 at 15:00
  • 2
    The only thing I could think of was to use a custom browser addon to force this behavior. If the users are not allowed to change settings this might be feasible. Which browser is your corporate standard? – Skerkles Feb 11 '15 at 15:26
  • You might want to try the `.focus()` method. Of course, it is limited by adblocking mechanisms, but when you can relax your browser settings… – Bergi Feb 11 '15 at 15:30

1 Answers1

0

Not sure this is something you can do with HTML/JS as you are trying to change the user's browser behaviour not your website's.

I'm still confuse by that :

...nothing happens, when they hit a hyperlink that references my website (although the existing tab is correctly updated of course but remains in the background).

Isn't it a normal browser behaviour with which people using the Internet are used to ?

saawsann
  • 625
  • 1
  • 6
  • 17
  • yeah that confused me too – ProblemsOfSumit Feb 11 '15 at 15:03
  • 1
    This is a comment, not an answer. – j08691 Feb 11 '15 at 15:04
  • @j08691 Hi! True, but I can't comment yet. However, this answer can't be completely useless as I answered no to the main question. – saawsann Feb 11 '15 at 15:14
  • sawsan, thanks for your comment. You're right, this is normal browser behavior. However, the users are working in a very complex enviroment that consists of desktop apps, rich webapps, classic websites, and more. So, they are not always aware of the actual class of app they are currently working with, and furthermore not even aware of where on app ends and the other begins as the business process flows right through all of those apps. Definitely not an ideal situation which I would like to improve in the first place, if I had the power to do so... – Sir Hackalot Feb 11 '15 at 15:28
  • Unfortunately I just have to add yet one more animal to this zoo of apps and am trying to keep the user's confusion to a minimum, which is hard as they just do expect something to (visually) happen, when they hit a button or hyperlink. This is the feedback I'm getting. – Sir Hackalot Feb 11 '15 at 15:28
  • @user2380687 Indeed, the working environment seems very complex. If what you need is a visual alert, what about using `window.onfocus` and create a visual alert in your website title? Ie: Put a default alert on your website title `NEW - Title of my page`, then remove it when `window.onfocus` is fired `Title of my page`. To be sure to catch users attention, you can also use a picto or make it blinking. But this implies that users have a view of all tabs. – saawsann Feb 11 '15 at 16:04