从 Eclipse 的内部 Web 浏览器中删除 cookie 和缓存

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15596519/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 20:14:39  来源:igfitidea点击:

Delete cookies & cache from internal web browser of Eclipse

eclipsebrowser-cache

提问by Basil Bourque

When using Eclipse Java EE IDE for Web Developersedition of Eclipse Juno SR2, and running a web app in the internal web browser, how does one delete that browser's cookies and cache?

当使用Eclipse Java EE IDE for Web Developers版本的 Eclipse Juno SR2 并在内部 Web 浏览器中运行 Web 应用程序时,如何删除该浏览器的 cookie 和缓存?

I've searched Eclipse's Help, the Google, and StackOverflow.com, but surprisingly found no direct correct answer to this simple question.

我搜索了 Eclipse 的帮助、Google 和 StackOverflow.com,但令人惊讶的是,没有找到对这个简单问题的直接正确答案。

采纳答案by Valentin Despa

Eclipse does not really have an Internal Browser. It just uses the default browser on the system. You can change this behaviour from

Eclipse 并没有真正的内部浏览器。它只是使用系统上的默认浏览器。您可以从

Window > Preferences > General > Web Browser

Window > Preferences > General > Web Browser

Clearing cookies should be done from the browser.

清除 cookie 应该从浏览器完成。

Let me know if this helps.

如果这有帮助,请告诉我。

回答by Erran Morad

Trimming the history list in Eclipse's internal web browser

在 Eclipse 的内部 Web 浏览器中修剪历史记录列表

I use the internal web browser quite a bit when I'm developing - if nothing else, it's a handy place to test out the GET requests for RESTful web services. I also use Eclipse for HTML writing, and again the internal browser is a useful first test of "does this look right yet?". This means I build up quite a long history list, and the most recent entries – the ones I'm mostly likely to be looking for – require scrolling to find and re-use them. I have not, to date, found a setting inside Eclipse (I'm using 3.3.2 at the time of writing this) to edit the internal browser history. I'd be delighted to be proved wrong.

我在开发时经常使用内部 Web 浏览器 - 如果不出意外,它是测试 RESTful Web 服务的 GET 请求的一个方便的地方。我还使用 Eclipse 编写 HTML,内部浏览器再次是“这看起来对吗?”的有用的第一次测试。这意味着我建立了一个相当长的历史列表,最近的条目——我最有可能寻找的那些——需要滚动才能找到并重新使用它们。迄今为止,我还没有在 Eclipse 中找到一个设置来编辑内部浏览器历史记录(在撰写本文时我使用的是 3.3.2)。我很高兴被证明是错误的。

In the meantime, the workaround is to close Eclipse, then edit the file $WORKSPACE/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.browser.prefswhere $WORKSPACEis your Eclipse workspace root directory. This is a plain text file: my preferred text editor on Linux and Windows is SciTE but it doesn't actually matter which one. This file has a preference key internalWebBrowserHistory, with the format:

同时,解决方法是关闭 Eclipse,然后编辑Eclipse 工作区根目录$WORKSPACE/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.browser.prefs所在的文件$WORKSPACE。这是一个纯文本文件:我在 Linux 和 Windows 上的首选文本编辑器是 SciTE,但实际上哪个并不重要。此文件有一个首选项键 internalWebBrowserHistory,格式为:

internalWebBrowserHistory=url|*|url|*| ...

internalWebBrowserHistory=url|*|url|*| ...

Removing stale entries is straightforward; modifying or adding new entries is perfectly doable, noting that colon characters (:) are escaped with a preceding backslash (\:). Save changes, restart Eclipse, done. Hopefully there will be an internal preference editor to make this easier inside Eclipse in future (or, someone will point out to me that I've been unobservant and that it's already there).

删除陈旧条目很简单;修改或添加新条目是完全可行的,注意冒号字符 (:) 使用前面的反斜杠 (\:) 进行转义。保存更改,重新启动 Eclipse,完成。希望将来会有一个内部首选项编辑器来使这在 Eclipse 中更容易(或者,有人会向我指出我一直没有观察到它已经存在了)。