Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to detect an item in a search result page has been opened in another browser tab
    primarykey
    data
    text
    <p>I searched through SO and this question has <a href="https://stackoverflow.com/questions/850058/is-it-possible-to-detect-if-a-user-has-opened-a-link-in-a-new-tab">been</a> <a href="https://stackoverflow.com/questions/4038629/possible-to-detect-if-a-user-has-multiple-tabs-of-your-site-open">asked</a> <a href="https://stackoverflow.com/questions/7554507/jquery-detect-mouse-click-and-open-target-in-new-tab">before</a> <a href="https://stackoverflow.com/questions/995492/how-to-trap-open-in-a-new-tab-clicks-in-jquery-click?rq=1">several</a> <a href="https://stackoverflow.com/questions/1516662/detect-when-link-is-clicked-open-in-new-frame?rq=1">times</a>, but I found no answers that explain how the behaviour I want to implement is actually realized.</p> <p>What I have in mind is to mimic booking.com feature, in which when you open a search result from the search results list, a div indicating that the result has been opened in another tab (or window) appears, and it fades away when that other tab (or window) has been closed.</p> <p>Screenshot: <img src="https://i.stack.imgur.com/l2QHV.png" alt="enter image description here"></p> <p>First attempt was to check if some javascript has been attached to the links, but that's not the case, because if you simply copy the url from the page source, and open it, the feature works.</p> <p>So I thought it could be someway managed on the server side, fired up wireshark to try to trap any ajax calls between the two opened pages and the server. There were many requests, but no one seems to pass the needed info (I guess the hotel ID or some url). Also note that opening the result item URL, which includes the session ID, in an incognito window or in another browser (I mean, firefox instead of chrome) window, breaks the feature; so that excludes any session or ip address tracking.</p> <p>Last attempt I could think was the search results page is polling some cookie which is set on the domain when another page is opened and unset when it is closed. So I checked the cookies, whose content is actually a little cryptic to understand, but what I have seen is that no cookie actually is changed on other tab opening and closing, so, again, it cannot be done this way.</p> <p>What's left?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload