如何在Cordova Universal Windows Phone 8.1 App中禁用WebView Cache? [英] How to disable WebView Cache in Cordova Universal Windows Phone 8.1 App?

查看:88
本文介绍了如何在Cordova Universal Windows Phone 8.1 App中禁用WebView Cache?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下相同请求无法到达服务器。我正在使用$ http来自angular。我确信这些请求会被windows webview缓存,因为在Android中它不会缓存。

Following same requests doesn't reach the server. I am using $http from angular. I am sure the requests get cached by the windows webview, because in Android ripple it does not cache.

我已经尝试过此请求/标题:

var request = {
        withCredentials: true,
        cache: false,
        headers: {
            'Cache-Control': 'no-cache',
            'If-Modified-Since': 'Mon, 26 Jul 1997 05:00:00 GMT',
            'Pragma': 'no-cache',
            'timestamp': timestamp,
        },
        method: 'GET',
        url: targetUri,
    }

服务器不允许在get请求中添加到url的任何其他参数。

Any other parameter added to url in get request isn't allowed by the server.

推荐答案

Windows Phone通用应用程序不使用webview。基础项目是WINJS项目。

The windows phone universal app doesn't use webview. The underlying project is WINJS project.

这是否适用于其他平台?

Does this work for other platform?

您是否曾在Ashish Sharma找到此博客

Have you ever found this blog by Ashish Sharma

http://www.oodlestechnologies.com/blogs/AngularJS-caching-issue-for-Internet-Explorer

适用于Internet Explorer,但我认为值得一试。保留上述代码并另外应用解决方法。

It is for Internet Explorer, but I think it's worth to try. Keep your above code and apply the workaround in addition.


这篇关于如何在Cordova Universal Windows Phone 8.1 App中禁用WebView Cache?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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