奇怪的jQuery的查询字符串追加 [英] Weird jQuery query string appended

查看:101
本文介绍了奇怪的jQuery的查询字符串追加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

能解释一些什么_的价值是怎么一回事?这是小提琴手是显示我有客户端上的jQuery的Ajax调用我的MVC 3页。

Can some explain what the "_" value is all about? This is what fiddler is showing me for my MVC 3 page that has a jQuery ajax call on the client.

GET /服务/ GetFoodDescriptionsLookup(100)?_ = 1291727469299 HTTP / 1.1

GET /Services/GetFoodDescriptionsLookup(100)?_=1291727469299 HTTP/1.1

在网址构建以这种方式,我不回来任何数据,但如果我键入

When the URL is constructed in this fashion I don't get back any data, but if I type

GET /服务/ GetFoodDescriptionsLookup(100)

GET /Services/GetFoodDescriptionsLookup(100)

这个作品..

感谢您,
斯蒂芬

Thank you, Stephen

推荐答案

它是由jQuery的加入到prevent缓存时的 缓存:假 设置。这基本上是IE的,不会重新提交一个AJAX GET请求(除非极其配置以及缓存策略)过于急切的高速缓存的解决方法。

It's added by jQuery to prevent caching when cache:false is set. This is basically a workaround for IE's over-eager caching that will not resubmit an AJAX GET request (unless the caching policy is extremely well-configured).

这篇关于奇怪的jQuery的查询字符串追加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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