window.open() on a multi-monitor/dual-monitor system – where does window pop up?

Result of “window.open dual-screen” search revealed this fancy nugget: Dual Monitors and Window.open “When the user clicks on a link that opens a new window using window.open. Make the window appear on the same monitor as its’ parent.” // Find Left Boundry of the Screen/Monitor function FindLeftScreenBoundry() { // Check if the window is off … Read more

How to set a file name using window.open

You can achieve this using the download attribute for <a> elements. For example: <a href=”https://stackoverflow.com/questions/7034754/1251354216241621.txt” download=”your-foo.txt”>Download Your Foo</a> This attribute indicates that the file should be downloaded (instead of displayed, if applicable) and specifies which filename should be used for the downloaded file. Instead of using window.open() you could generate an invisible link with the … Read more

window.open with headers

Can I control the HTTP headers sent by window.open (cross browser)? No If not, can I somehow window.open a page that then issues my request with custom headers inside its popped-up window? You can request a URL that triggers a server side program which makes the request with arbitrary headers and then returns the response … Read more