Ajax 进入成功,无需在页面加载时调用 url。它正在调用 after4er 删除缓存
在我的页面中,我正在发出 ajax 请求 &我正在成功构建页面选项卡。 用户可以更改选项卡和保存布局。
因此,再次刷新后,该 ajax 必须进行 call &它需要从数据库中带来保存的选项卡列表。需要在其上构建选项卡。
但就我而言,即使我已经成功编写了所有代码,它也正在进入 success & 。仅在旧列表上构建选项卡.. 不包括新列表。 即使回应也只是旧列表......
&在 fidler 中我看不到 url 调用。
但是当我删除缓存时,url 调用也会消失 &它能够加载新的选项卡列表。
In my page I am making an ajax request & in success I am building tabs of page.
And user can change the tabs & save the layout.
So after refreshing again this ajax has to make call & from database it needs to bring saved tabs list. on which the tabs need to be built.
But in my case, even i have written all my code in success, it is entering success & building tabs on old list only..
not with the new list.
even the response is coming as old list only..
& in fidler I am not able to see the url call.
But when i delete the cache at that time url call also goes & it is able to load with new tabs list.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果响应仍然是旧列表,您的数据未保存在后端,请验证您的数据库是否确实保存了记录。
如果您通过 POST 客户端缓存发送应该不是问题,如果是 GET 请求,请检查 firebug 是否正在发送 Cachebuster 参数。这是一个额外的 GET 参数 _dc,随每个请求一起发送,以防止浏览器缓存 GET 响应。
您是否可能使用某种反向代理,例如 Varnish 或 Squid?
If the response is still the old list your data isn't being saved in your backend, verify your database that the records are in fact saved.
If you are sending over POST client side caching shouldn't be the problem, if it is a GET request check firebug if the cachebuster parameter is being sent along. This is an extra GET parameter _dc that is being sent with each request to prevent GET responses from being cached by the browser.
Are you perhaps using some kind of reverse proxy by any chance like Varnish or Squid?