Search code examples
htmlemailurlparametershref

Is there a URL parameter that will make the URL open in a specifically named browser window


I have an email digest that is sent daily to users of my website and contains links to things on the site so that they can easily get right in and start interacting from their email. Trouble is, if they click more than one link, they're going to be opening more than one browser and the non-technical user might not catch that and end up having to close a bunch of tabs/browsers when they're done on the site. I want all the links in the email digest to be opened in the same window/tab.

I know that if you have an href you can set target=my_window and the links will open in that window. I'm wondering if there's a URL parameter that can be used instead of editing the a tag.


Solution

  • Can you use the window.open method?

    Reference: window.open(url, name, features, replace);

    It allows a browser window to be named, and thus reused when clicking on new links that are formatted to work with the window.open syntax.

    Example: link

    Status Update: Note you can search for many window.open(); Online Generators to help build the look of the opened window. It's important to test the desired look in all browsers, as the Address Bar in each browser is rendered differently.