如何在Android版Chrome中强制重新加载 [英] How can I force a hard reload in Chrome for Android

查看:135
本文介绍了如何在Android版Chrome中强制重新加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在桌面版Chrome浏览器中,开发人员工具中有一些选项可以在打开开发人员工具时完全禁用缓存,也可以在长按重新加载按钮(打开开发人员工具时)时手动进行硬重加载.

In Chrome for desktop I have options in the dev tools to disable cache completely when dev tools are opened and I have the options to manually do a hard reload when long clicking on the reload button (with dev tools open).

适用于Android的Chrome浏览器有这种技术吗?我没有找到任何设置. 在开发时要强制浏览器下载一些javascript或css文件而不使用缓存的文件,该怎么办?

Is there any such technique for Chrome for Android? I didn't find any setting. What can I do when I want to force the browser to download some javascript or css file instead of using a cached one when developing?

推荐答案

我根据这个类似的问题),它会强制从服务器重新加载页面.

I'm using window.location.reload(true) according to MDN (and this similar question) it forces page to reload from server.

您可以通过在地址栏中键入javascript:location.reload(true)在浏览器中执行此代码.

You can execute this code in the browser by typing javascript:location.reload(true) in the address bar.

这篇关于如何在Android版Chrome中强制重新加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆