在Chrome的桌面,我有选项在开发工具完全禁用缓存时,开发工具被打开,我有选项手动做一个硬加载时,长时间点击重新加载按钮(与开发工具打开)。

Chrome for Android有这样的技术吗?我没有找到任何背景。 当我想强迫浏览器下载一些javascript或css文件,而不是使用一个缓存时,我该怎么做?


当前回答

截至2018年,来自谷歌帮助中心(在Chrome 63上测试):

点击三点菜单; 选择历史记录>清除浏览数据; 如果需要,请选择时间段(在检查表上方); 取消所有项目,但缓存的图像和文件; 清理数据并确认。

正如在另一个回答中提到的,隐身标签在开发中也很有用。

其他回答

我找到了一个可行的办法,但很难看。

Connect the Android device to your PC with a USB cable and open Chrome on your desktop. Right-click anywhere on a page and select "Inspect". Click the three-dot menu and select "Remote devices" under the "More tools" menu: In the panel that opens, select your device and then the "Inspect" button next to the name of the tab on your phone that needs to be refreshed: In the window that opens, click the "Network" tab and check the "Disable cache" checkbox: Reload the page on your phone or using the reload button in the DevTools window.

注意:如果你的手机没有出现在设备列表中: 确保USB连接使用的是文件传输模式,而不是简单的充电 尝试重新启动ADB或运行ADB设备,看看设备是否被检测到

还有一个选项:

菜单 设置 隐私 清除浏览数据 选择“缓存”并按“清除”

然后重新加载页面。

我一直在为不刷新的CSS文件而挣扎。但是您可以在地址栏中输入CSS文件本身的名称并刷新它。之后就好了。Android 8上的Chrome。显然,如果涉及多个文件,这将是令人厌烦的。

有几个方法来强制重载铬移动设备:

清晰的历史(见上文) 使用远程调试(参见上面) 请求桌面站点 禁用“精简模式” 打开。js或。css的URL,然后正常重载。

我使用window.location.reload(true)根据MDN(和这个类似的问题)它迫使页面从服务器重新加载。

你可以在浏览器的地址栏中输入javascript:location.reload(true)来执行这段代码。