With my web application, I need to keep only a singe instance of the page at once. If new instance is opened in a new tab, I need to close the previous one. I have seen many posts related to this and all of them are saying that I can only close tabs in Chrome that are opened programmatically and by created by itself but not the current tab. I am aware of it being a security threat but this is the customer's requirement. Client browser settings are controlable and I can do any settings as needed. So, I am looking a way to go around this security policy.
Close current tab with javascript in Google Chrome
658 views Asked by Harsh Shankar At
1
There are 1 answers
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in GOOGLE-CHROME
- How to tweak the security policy of Chrome, in order to run "unsafe" snippets in the console?
- Is it possible to manipuate 3rd party Chrome Extensions Network Reqeuests?
- undetected_chromedriver urllib.error.URLError
- Load testing k6 browser + docker
- Editor texto estilo WYSIWYG
- NodeJS crashing chrome browser
- Difficulty Accessing HTTP URLs/IP Addresses Due to Browser Redirecting to HTTPS: Seeking Solutions
- Chrome extension MV3: persistent service worker die after wake up from hibernation
- Attempting to Bundle a Require Command For a Chrome Extension
- Launch URL from C# and detect when browser is closed
- Python selenium scrap data from dynamic website table
- Google Chrome is consuming a lot of CPU on a video call?
- Component drawing error React App on Android + Chrome
- Chrome Selenium CDP Bidi API - Next Commands sended to Target Session have no effect while the initial one does work
- Devtools not working when i try to inspect elements for selenium python it goes to previous page
Related Questions in ANDROID-CHROME
- Audio recording using RecordRTC: Blob Size Difference Between Android and Windows on Chrome
- How do I resolve the 419 Page Expired error created by a token mismatch arising from Chrome Password Manager and Laravel 10 app login
- NullPointer Exception on BitMap.getwidth() at chromium-TrichromeWebViewGoogle.aab
- launching Android Chrome Browser through Appium Automation using emulator is throwing error and chrome browser is not launched properly
- Android Chrome (106) sometimes fails to resize to full screen after keyboard usage
- ACTION_VIEW directly opens the URL chrome browser instead of showing options for different browsers
- how to maintain specific version for embedded web view across different devices?
- Why can't I get a MediaStream from back camera when front camera is in use on Android Chrome?
- Android Chrome not cache big file even fetching by force-cache
- Android Chrome runs requestAnimationFrame at 60FPS but renders at 30FPS
- Android Chrome failed to repeat very long background image
- How to force Custom Tabs to launch as Desktop site everytime?
- Why can't chrome read local html file on android?
- Android Google Chrome menu-burger transition issue(translateY doesn't work properly)
- Close current tab with javascript in Google Chrome
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You only can close the page you open. but you can close another tab.
But you can still achieve what you want. Communicate to your server and check if the same client open two tabs by checking their token stored in their page. If yes, close one of them (you can only close itself), if you are failed to close itself because of some security reason, then just turn the whole page white.