You can sort of do it like this:
if (history.length == 1) { // Um, needs to be 0 for IE, 1 for Firefox
// This is a new window or a new tab.
}
There may be other ways for history.length
to be 1
, but I don’t know what they might be.
More Related Contents:
- Open a URL in a new tab (and not a new window)
- Chrome: timeouts/interval suspended in background tabs?
- Twitter Bootstrap Tabs: Go to Specific Tab on Page Reload or Hyperlink
- Data-toggle tab does not download Leaflet map
- Redirect a state to default substate with UI-Router in AngularJS
- Programmatically open new pages on Tabs
- Accessing the content of other tabs in a browser
- jQuery UI Tabs – How to Get Currently Selected Tab Index
- jQuery selector doesn’t update after dynamically adding new elements
- Any way to identify browser tab in JavaScript?
- open url in new tab or reuse existing one whenever possible
- Open multiple links in Chrome at once as new tabs
- Stop people having my website loaded on multiple tabs
- How to build simple tabs with jQuery?
- How to make Jquery UI Tabs scroll horizontally if there are too many tabs
- Force window.open() to create new tab in chrome
- JQuery UI Tabs Causing Screen to “Jump”
- How to change tabs programmatically in jquery-ui 1.9?
- Is there any way to detect that window is currently active in IE8?
- Retrieving which tabs are open in Chrome?
- How does this object method definition work without the “function” keyword?
- Javascript if statements not working [duplicate]
- Javascript – Sort Array of objects by 2 Properties
- Remove x-axis label/text in chart.js
- HTML canvas – drawing disappear on resizing
- AngularJS: ng-selected doesn’t show selected value [duplicate]
- React Warning: flattenChildren(…): Encountered two children with the same key
- AngularJS – Show byte array content as image
- How to count the number of lines of a string in javascript
- Globally defined AngularJS controllers and encapsulation