这是一个清理Chrome DNS 缓存组件 基于chrome-remote-interface开发。
npm install chrome-dns-clear
google浏览器必须配置如下启动参数:
- --enable-benchmarking : 启用基准测试扩展
- --enable-net-benchmarking : 启用网络基准测试扩展
- --remote-debugging-port=9222 : 开启远程调试
google-chrome --enable-benchmarking --enable-net-benchmarking --remote-debugging-port=9222
- 快捷方式
注意: 任务栏中的快捷方式必须重新锁定,才能生效
-
注册表 (全局配置)
路径:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML\shell\open\command修改为:
"/YOUR_CHROMEPATH/chrome.exe" --enable-benchmarking --enable-net-benchmarking --remote-debugging-port=9222 -- "%1"
-
切换Google安装目录
cd "/Applications/Google Chrome.app/Contents/MacOS/"
-
重命名的启动脚本
sudo mv "Google Chrome" Google.real -
编辑启动脚本
vim "Google Chrome" -
键入启动参数
#!/bin/bash cd "/Applications/Google Chrome.app/Contents/MacOS" "/Applications/Google Chrome.app/Contents/MacOS/Google.real" --enable-benchmarking --enable-net-benchmarking --remote-debugging-port=9222
-
Shift+Q退回正常模式,X保存并退出 -
添加执行权限
sudo chmod u+x "Google Chrome"
-
打开 Chrome 启动脚本
vim /usr/bin/google-chrome -
命令行
exec -a "$0" "$HERE/chrome" "$@"之后, 追加启动参数exec -a "$0" "$HERE/chrome" "$@" --enable-benchmarking --enable-net-benchmarking --remote-debugging-port=9222 -
Shift+Q退回正常模式,X保存并退出
注意: Root账户中使用Chrome,需追加
--no-sandbox --user-data-dir启动沙盒模式。 虚拟机环境下,需关闭3D加速。
Chrome 浏览器 键入 chrome://version/