开发者

Javascript Button In Gmail Signature [closed]

开发者 https://www.devze.com 2023-04-01 02:30 出处:网络
Closed. This question is off开发者_如何学C-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off开发者_如何学C-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

Improve this question

I was wondering how, or if it is even possible, to embed a javascript button in my gmail signature?


You can't. Or at least, I really, really hope you can't.

Javascript does not belong on e-mails. If it did, then people could receive nightmarishly evil emails that open an infinite number of alerts, redirect them to an offsite page, read your emails and your contact list, and so on. There are too many security repercussions of allowing Javascript inside of e-mails.

For this reason, gmail blocks javascript inside of emails, as any respectable e-mail client should.


Html emails shown in browser email clients will be stripped of all javascript so you can try but it won't work. Other clients such as outlook (which uses MS Word to render the html) also strip (or ignore?) the javascript. It's a vulnerability to allow it.

Think of this scenario: javascript on a page has full access to make ajax calls. You could use JS to iterate through all your emails and contacts etc and then send them on to a foreign server.

Allowing JS to run in emails would be the equivalent of allowing XSS.

0

精彩评论

暂无评论...
验证码 换一张
取 消