I use window.open to populate a new window with various contents. Mostly reports and stored HTML files from automated processes.
I noticed a very incompatible behavior with Chrome regarding window.open ().
Some of my calls will create a new tab (preferred behavior) and some popups.
var w = window.open('','_new'); w.document.write(page_content);
page_content is plain HTML from AJAX calls. Reports contain some information in the header, such as the title, icon, and some style sheets.
In IE9, code calls up a new tab instead of a popup, while Chrome flatly refuses to display the content in question on a new tab. Since content is important business data, I cannot post it here. I will answer questions if I can.
I know that some people will say that this behavior is left to the user, but this is an internal business platform. We donβt have time to teach all users how to manage pop-ups, and we just need them to be on a new tab. Heck, even a new window would be preferable to a popup, since you cannot attach a popup in Chrome. Not to mention that none of the pop-up blockers will affect it.
Appreciate any insight.
javascript google-chrome tabs
user1441141 Aug 17 2018-12-12T00: 00Z
source share