Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8069903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:12:56+00:00 2026-06-05T13:12:56+00:00

I want users to browse my site from only one tab in their browser.

  • 0

I want users to browse my site from only one tab in their browser. How can this be done? Would I use javascript and cookies?

For example, I have a website: http://www.example.com – and I want my clients to only be able to visit the site from one single tab in one browser. If they open another tab and load the site (or a subpage of the site) – I want an alert “Can’t open multiple instances“, and then redirect them to an error page.

Once thing to note – if the user changes the address from http://www.example.com/action/door/mine.aspx to http://www.example.com – that should work fine, because the user is in the same (original) tab.

Any help will be appreciated. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T13:13:01+00:00Added an answer on June 5, 2026 at 1:13 pm

    EDIT2:

    It’s the exact thing which is mentioned at this answer, You need 2 IDs:

    1. One random one
    2. One consistent one (this will be our SSID actually, since you limit tabs of a single browser, it’s better to get generated form browser’s unique parameters)

    You can generate consistent one from browser’s user-agent or get it from server-side. store both of them server-side.
    Store the random one in window.name property which is tab-specific.
    Send a heartbeat every 1~2 seconds to your server containing both consistent ID and random one. if server fails to receive the heartbeat, it cleans up database and de-register dead clients.

    on every browser’s request, check window.name for the value. if it were missing, check with the server-side whether if the previous tab is closed or not (cleaned from database).

    If yes, generate a new pair for client if no, reject them.


    Two suggestions on top of my mind:

    1. Server-side (better): provide all your clients, a user name and password. request them on their first visit of your site to enter with their credentials. then on every other request, check for whether user with said credentials is already logged in or not.
      Client *
             |
             |
          Server ---> Check whether
                      Already logged
                         or not?
                      ______________
                       |          |
                      yes         no
                       |          |
                     permit     reject
                      them       them
    
    1. Client-side: If you really need a strong check of this, use evercookie to store an already-logged-in cookie on client’s machine.

    Side-note: Do know that every attempt in client side is not secure at all! client-side should help server-side, it shouldn’t be used as the one and only source of security. even evercookies can be deleted so, give my first suggestion a go.


    **EDIT:**

    Evercookie is really doing a good job at storing most secure zombie cookies ever but since the library itself is a little bit heavy for browsers (storing a cookie takes more than 100ms each time) it’s not really recommended for using in real-world web app.

    use these instead if you went with server-side solution:

    • Way around ASP.NET session being shared across multiple tab windows
    • Kiranvj’s answer
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We only want users from a specific website to use our services. Is there
I want to only allow users with IE8 (not IE6, IE7) or another browser
I have a website from which I want to enable browser users to download
i want users can log in my website throw FB connect ON MOBILE but
Is there some method to issue a screen capture(browser window content only) from the
I want users to be able to install their own personal certificate into my
I have a site that gets most of it's traffic (like 90%) from users
From a C# application I want to activate (brint to front) a site that
Can someone help me with a regular expression that would help me do this.
Hi I want all my new / 1st users to my site to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.