If a tab already exists for the URL I'm trying to navigate to, bring it to foreground




Tabbed Browser
9 years ago
9 years ago


(Reporter: Jud Valeski, Unassigned)


Firefox Tracking Flags

(Not tracked)


(Whiteboard: DUPEME?)



9 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2

Throughout the day, dozens of tabs pile up in my browser window, and many of them are on the same page (e.g. mail.google.com). I'm lazy, and don't navigate back to existing tabs, and instead, I just open a new tab, and open the URL I want in the new tab. When I do this, I'd rather the browser just bring the tab already on said URL, to the foreground. This will prevent me from opening many tabs on the same page.

1. in tab1 goto www.cnn.com
2. in tab2 goto www.whatever.com
3. in tab3 goto www.there.com
4. in tab4 goto www.cnn.com
5. after hitting enter on #4's www.cnn.com, the browser should close tab4 and just bring tab1 to the foreground.

Reproducible: Always

Comment 1

9 years ago
of course, the browser needs to determine if the "URL" is actually the same. for example, it needs to determine whether not POST data or forms in some filled state, would render the URL "the same."

Comment 2

9 years ago
note, the tab is only brought to the front, not actually reloaded/refreshed.

Comment 3

9 years ago
How would you load two tabs that point to the same url?
OS: Mac OS X → All
Hardware: x86 → All

Comment 4

9 years ago
This is similar to bug 406977.

Comment 5

9 years ago
yes, similar to 406977.

re: doug's question. the devil's in the details around what constitutes equality between two "URLs" (URLs being more than just the URL string itself).

here's a crack at the equality function:
equals(URLa, URLb) {
  if URLa.string == URLb.string (complete URL string including params)
    && URLa.POSTData == URLb.POSTData  (POST data that was submitted for 'a', and POST data that's about to be submitted for 'b')
  then return true
  else return false

you could further constrain when the functionality was invoked to when the user loads a URL from either bookmarks, the URL bar, or link clicks (e.g. explicit loads).

there's obviously more to this than meets the eye, I'm just trying to solve for the frequent use case of "user has many tabs open to the same URL when it's un-necessary."

Comment 6

9 years ago
I would also note that Safari on iPhone does this.

Comment 7

9 years ago
marking new.
Ever confirmed: true


9 years ago
Whiteboard: DUPEME?
You need to log in before you can comment on or make changes to this bug.