如何制作替换网站 cookie 的 HTML 脚本 [英] How to make a HTML script that replaces the cookies of a website
本文介绍了如何制作替换网站 cookie 的 HTML 脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想制作一个 HTML 脚本,通过单击一个按钮来替换特定网站的 cookie.
I'd want to make a HTML script that will replaces the cookies of a specific website with a single button click.
PS:我不知道这是怎么做的,我之前已经创建了扩展程序,但是我想创建一个可以完成相同工作的网页.
PS: I have no idea how this is done, I've created extensions before, However I want to create a webpage that does the same job.
推荐答案
HTML 没有能力对 cookie 做任何事情.
HTML has no capability to do anything at all with cookies.
Cookie 可以通过以下方式设置:
Cookies can be set with:
- cookie 所属源的客户端 JS
- 响应来源的 HTTP 响应标头
您不能创建控制属于任意第三方站点的 cookie 的网页.那将是一个严重的安全问题.
You cannot create a webpage which has control of the cookies belonging to an arbitary third party site. That would be a serious security problem.
这篇关于如何制作替换网站 cookie 的 HTML 脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文