cookies为本地HTML文件保存在哪里? [英] Where are cookies saved for a local HTML file?
问题描述
我在桌面上创建了一个HTML文件,并添加了一些JavaScript来设置和清除cookie。
现在我的问题是,Cookie是否会保存在我的浏览器中?我可以阅读吗?
如果是,
-
哪个域名可以保存?
-
我如何在Google Chrome浏览器中看到它? (在Chrome上运行HTML)
不从本地网页存储cookies: Firefox有很棒的功能
目的你可以设置一个开发域如localhost或myfakedomain.com,并在本地服务器上运行您的文件。
搜索:
>
I created an HTML file on my desktop and added some JavaScript to set and clear cookies.
Now my question is, will the cookie be saved in my browser? Can I read it back?
if Yes,
For which domain will it be saved?
How can I see it in Google Chrome? (HTML run on Chrome)
Unfortunately some browsers including Google Chrome do not store cookies from local web pages:
Firefox has great developer plugins for cookie management, which report their domains, access paths and expiry:
- https://addons.mozilla.org/en-US/firefox/addon/view-cookies/
- https://addons.mozilla.org/en-US/firefox/addon/firecookie/ (Personal Favourite - Requires FireBug)
For local development purposes you can setup a development domain like "localhost" or "myfakedomain.com" and run your files on a local server.
Search:
- Editing Hosts File [operating system]
- Setup Local server on [operating system] (I use xampp)
这篇关于cookies为本地HTML文件保存在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!