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

怎样保证webView中的图片只下载一次呢 ,目前感觉浪费流量 #15

Open
chenliming777 opened this issue Dec 30, 2015 · 3 comments

Comments

@chenliming777
Copy link

js与webView交互应该可以做到,可以参考webViewjavascriptBridge,这样就更完美了

@dsxNiubility
Copy link
Owner

你是说如果图片已经加载出来了,再点保存就不下载了,直接把缓存的那个保存到相册?

@chenliming777
Copy link
Author

不是,我的意思是目前详情页中的图片(WebView中的图片就是src:)这个每次打开这个网页都是重新下载的嘛(这里我不太确定)?我的想法是不是用SDWebImage来下载webView中的图片,然后将下载后的地址回传给js,更新图片,这样比较好控制删除缓存等~

@dsxNiubility
Copy link
Owner

恩 做图片缓存的话就是这个思路。 �当时没做这么细,如果吧webView中的图片都用sdWebimg下载,再设置下缓存策略就可以不重复下载图片了。

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