在Chrome的桌面,我有选项在开发工具完全禁用缓存时,开发工具被打开,我有选项手动做一个硬加载时,长时间点击重新加载按钮(与开发工具打开)。
Chrome for Android有这样的技术吗?我没有找到任何背景。 当我想强迫浏览器下载一些javascript或css文件,而不是使用一个缓存时,我该怎么做?
在Chrome的桌面,我有选项在开发工具完全禁用缓存时,开发工具被打开,我有选项手动做一个硬加载时,长时间点击重新加载按钮(与开发工具打开)。
Chrome for Android有这样的技术吗?我没有找到任何背景。 当我想强迫浏览器下载一些javascript或css文件,而不是使用一个缓存时,我该怎么做?
当前回答
不要忘记确保“减少数据使用”设置是关闭的,因为它似乎下载缓存的数据(从谷歌服务器?),即使您的本地缓存被刷新。
其他回答
如果这是一个选项,你可以直接访问(即JavaScript)资源,重新加载很多次,这也会触发该资源的硬重新加载。然后可以重新加载实际页面。
启动Chrome Android应用程序 点击菜单查看更多选项。 从选项列表中选择“设置”。 向下滚动并点击“站点设置”选项卡。 在“站点设置”中打开“数据存储”选项卡。 点击要删除存储的站点URL。 点击“清除&重置”命令按钮。 刷新网站页面。
我找到了一个可行的办法,但很难看。
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设备,看看设备是否被检测到
大多数答案对我都不起作用。 以下是2020年8月我在Galaxy S8上的一个超级简单的工作:
在http:....之前添加“view-source:”地址,导航槽有改变的文件,如果不同于HTML或索引。
您将看到未更改的文件。刷新。
完成了。
如果只是包含文件的问题,只需在路径后添加version (?v=12345678)
<link rel="stylesheet" type="text/css" href="style.css?v=12345678" />
无论谁再次加载页面都将看到更改。