Blocking Chrome Extensions from running on my site

后端 未结 2 884
清酒与你
清酒与你 2020-12-01 19:19

As a web developer, is there any way to prevent a user\'s Chrome extensions from being applied to my site? i.e. a header, meta tag, anything? Additionally, if there is, is

相关标签:
2条回答
  • 2020-12-01 19:42

    It's not possible. At the web server end, you are only only able to control what the browser will allow you to control. In simple terms, this means you can control the data (HTML, javascript, headers etc) that you send back to it. That's about it.

    0 讨论(0)
  • 2020-12-01 20:05

    Can't you create a Content Security Policy (CSP) and block inline javascript and only allow javascript from specific domains? You could even create a CSP in report-only mode and collect violation reports via something like https://report-uri.io/

    0 讨论(0)
提交回复
热议问题