I'm having an issue with a page in internet explorer. I have an ajax call that calls a form, in other browser, when I click the link it passes in the controller and load correctly data. but in IE, when its loaded once, it aways brings me the same old results without passing in the controller.
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- MVC-Routing,Why i can not ignore defaults,The matc
- How to fix IE ClearType + jQuery opacity problem i
- Using :remote => true with hover event
- Is there a way to play audio on a mobile browser w
相关文章
- spring boot用ajax发送请求后,请求路径多了controller的路径
- 针对复杂结构的前端页面,如何更好地与后台交互实现动态网页?
- ajax上传图片,偶尔会出现后台保存的图片有错误或者已损坏,请问可能是什么原因造成的?
- 前端 我想知道怎样通过发ajax请求向服务器拿到数据然后分页显示 最好是点击一页就发一次请求
- 接口返回的数据格式如下,请问可以取到level值为2的name数组呢
- 如何通过页面输入账号密码提交给后端
- How to get jQuery.ajax response status?
- How to read local csv file in client side javascri
Try:
This attribute, placed in controller class, disables caching. Since I don't need caching in my application, I placed it in my BaseController class:
Here is nice description about OutputCacheAttribute: Improving Performance with Output Caching
You can place it on action too.
You could try setting the
cache
option tofalse
:This option will force the browser not to cache the request.
UPDATE:
Based on the comment you could add a unique timestamp to the url to avoid caching issues:
I also found this very useful on a similar (but not identical) issue.
http://forums.asp.net/t/1681358.aspx/1?Disable+cache+in+Ajax+ActionLink+extension+method+in+asp+net+MVC
Basically make sure that you're using POST as opposed to GET in your requests. Doing so seems to prevent IE from caching.
Eg:
@Ajax.ActionLink("Clear Contacts", MVC.Home.ClearContacts(), new AjaxOptions{HttpMethod = "POST", UpdateTargetId="targetDiv"})
actually in IE browser caching not clear automatically. but in chrome scripts working accepted.so you need to try for clearing data in browser level.
You can use
HttpMethod = "POST"
on your AjaxOptionslike this exp;
If you are using the Ajax Helper, you can set the
AllowCache
parameter tofalse
like this:And IE won't cache the results of the call.