I want to open a webpage in the same tab by clicking a link from email. So, If the webpage is already open in a tab, By clicking the link in email should not open another tab but should use the same tab to render the webpage.
For example - if .html is already open in a tab, By clicking .html link from email should not open another tab but should open the application in the same tab.
I understand, we can do this programatically using Javascript like window.open(".html","_self")
but is there a way to form the URL to be used in email to open the webpage to acplish this?
Thanks
I want to open a webpage in the same tab by clicking a link from email. So, If the webpage is already open in a tab, By clicking the link in email should not open another tab but should use the same tab to render the webpage.
For example - if https://example./index.html is already open in a tab, By clicking https://example./index.html link from email should not open another tab but should open the application in the same tab.
I understand, we can do this programatically using Javascript like window.open("https://example./index.html","_self")
but is there a way to form the URL to be used in email to open the webpage to acplish this?
Thanks
Share Improve this question asked Sep 8, 2017 at 14:54 GendafulGendaful 5,80213 gold badges59 silver badges78 bronze badges 3- 2 There is no way you can do that - and if you could do that, browser manufactorers would shut it down. Do not mess with the behaviour of the user. If the user wants to have your link in an already opened tab, he would open it there. – D B Commented Sep 8, 2017 at 14:57
- 1 absolutelly, there´s no way, – bjesua Commented Sep 8, 2017 at 15:02
- Got it. Had the same thoughts. Thanks for the suggestions. – Gendaful Commented Sep 8, 2017 at 15:17
3 Answers
Reset to default 4No, it is not technically possible. There are no ways to send this type of instructions from an email client to the browser. Moreover, javascript is not allowed in emails.
Use target="_self" in a page
<a href="https://example./index.html" target="_self">The Link</a>
From an email... not possible, because the email client has no idea in what tab the standard browser is
This is not possible for links in e-mails. Usually, the mail service provider is set to open it in a new tab so that the user is still connected.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744236662a4564503.html
评论列表(0条)