浏览网站时,Cookie如何工作 [英] How do cookies work when browsing websites

查看:106
本文介绍了浏览网站时,Cookie如何工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在您必须输入用户名和密码的网站上,我注意到我可以使用一个浏览器浏览网站,无论我在网站上的哪个位置,它都会知道我是谁。但是如果我打开不同的浏览器,它不知道我在该浏览器中是谁,除非我在该浏览器中登录。



登录网站后,它会在我的浏览器中存储某种cookie,并且每次导航到该网站上的不同页面时,它会检查该cookie是否为我的身份。



我已登录,然后在浏览网站上的其他网页之前删除了Cookie?

解决方案

教一个人去钓鱼的答案,所以我道歉,如果它不是你的后。但如果你接受我的建议,你会学到很多,所以请相信我:)



有很多工具可以用来完全跟踪 >您的浏览器和服务器之间的http流量。一个名为Firebug,Firefox的插件。另一种工具称为Web调试代理。有

您想使用这些工具做什么是使用网站,然后查看原始请求。这显示您的浏览器正在向服务器说什么。您会看到该服务器的Cookie与每个请求一起发送。这些工具的好处是,您可以在发送之前编辑请求,这样您可以测试服务器的响应...


On websites where you have to enter a user name and password, I notice that I can browse the site with one browser and it will know who I am no matter where I go on the site. But if I open a different browser it doesn't know who I am in that browser unless I log on in that browser.

After I log in to a website, does it store some kind of cookie in my browser, and every time I navigate to a different page on that site, it checks the cookie for my identity?

What would happen if I logged in, and then before browsing to a different page on the site, deleted the cookie?

解决方案

This is more of a "teach a man to fish" answer, so I apologise if it's not what you were after. But if you take my advice you will learn lots, so please trust me :)

There's a number of tools that you can use to track exactly what http traffic is going between your browser and the server. One is called Firebug, a plugin for Firefox. The other kind of tool is called a "web debugging proxy". There's charles, which is very powerful, and fiddler, which is free.

What you want to do with any of these tools is use a website, and then look at the raw request. This shows you exactly what your browser is saying to the server. You'll see the cookies for that server are sent along with every request. What's cool about these tools is that you can edit a request just before it's sent, so you can test how the servers respond...

这篇关于浏览网站时,Cookie如何工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆