GET请求仅在IE10中首次发送到REST API [英] GET request sent to REST API only first time in IE10

查看:140
本文介绍了GET请求仅在IE10中首次发送到REST API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始使用Restangular向RESTful服务提出跨域请求,到目前为止,一切都很好。但是在IE10中,当第一次发出GET请求时,它会从服务器获取数据,而对于后续调用,它不会触及服务器,并且可能返回缓存的数据。我需要从服务器获取刷新的数据。我试着将defaultHttpFields缓存设置为false,但没有运气。请帮助!

谢谢,
Lakshmi

解决方案

我是Restangular的创建者。



请你举个例子吗?如果您没有在defaultHttpfields中将缓存设置为true,Restangular就不应该缓存它。



如果请求在网络选项卡中发布的开发者控制台?它在其他浏览器中工作吗?检查Restangular资源库中是否存在$ http调用。



希望它有帮助!


I've recently started using Restangular for making cross domain requests to a RESTful service, and so far everything works great.

But with IE10 when a make a GET request only for the first time it gets data from the Server, and for subsequent calls it does not hit the server, and returns probably cached data. I need to get the data refreshed from the Server. I tried setting defaultHttpFields cache to false, but no luck. Please help!

Thanks, Lakshmi

解决方案

I'm the creator of Restangular.

Could you please post an example? If you didn't set the cache to true in defaultHttpfields, Restangular shouldn't cache this at all.

Have you chcked if the requests are going out in the Network tab of the developers console? Does it work in other browsers? Check in restangular Library for RestangularResource to see if it's doing $http call.

Hope it helps!

这篇关于GET请求仅在IE10中首次发送到REST API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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