Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能不能把响应内容替换成时间戳或随机数 #31

Closed
BabyCY opened this issue Feb 6, 2017 · 4 comments
Closed

能不能把响应内容替换成时间戳或随机数 #31

BabyCY opened this issue Feb 6, 2017 · 4 comments

Comments

@BabyCY
Copy link

BabyCY commented Feb 6, 2017

比如 test.html 里面有个<script src="test.js"></script>,我想拦截这个test.js,但是因为有缓存,所以浏览器不会发起请求,拦截失败。因此,想要替换成<script src="test.js?时间戳"></script>,这样就能发起请求了。

@avwo
Copy link
Owner

avwo commented Feb 6, 2017

可以直接禁用某些url的缓存:disable

如果要加时间戳比较麻烦:用ruleFile动态生成时间戳及resReplace规则做内容替换

@BabyCY
Copy link
Author

BabyCY commented Feb 6, 2017

pc端还好,主要是移动端开发比较麻烦,有些根本清不了缓存,像微信的缓存就很恶心,fiddler就可以写js表达式,charles也不行。这个功能还是很需要的

@avwo
Copy link
Owner

avwo commented Feb 6, 2017

可以通过插件ruleFile结合resReplace动态生成规则做这个事情

@BabyCY
Copy link
Author

BabyCY commented Feb 6, 2017

好的,谢谢

@BabyCY BabyCY closed this as completed Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants