Check Duplicate Browser Tabs/Windows With jQuery - duplicate.js

File Size: 3.16 KB
Views Total: 11553
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Check Duplicate Browser Tabs/Windows With jQuery - duplicate.js

duplicate.js is a tiny, useful, jQuery based duplicate window checker that checks if a browser tab/window is already opened using pure JavaScript.

How to use it:

1. Download and put the JavaScript file duplicate.js after loading jQuery JavaScript library.

<script src="" 
<script src="duplicate.js"></script>

2. Do something if the current browser tab/window is duplicate.

$(document).ready(function () {

  if (window.IsDuplicate()) {

    // alert user the tab is duplicate
    alert("Window Already Opened in Another Tab\nPlease Click Ok");

    // close the current tab


This awesome jQuery plugin is developed by AshrafAliS. For more Advanced Usages, please check the demo page or visit the official website.