Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem that ajax does not refresh data when it requests data many times in jquery?

Shulou Source: shulou.com Published: 2022-06-03 14:35:02 11月14日 Update

This article mainly shows you "how to solve the problem of not refreshing data when ajax requests data many times in jquery", the content is simple and clear, and I hope it can help you solve your doubts. Let me lead you to study and learn "how to solve the problem of not refreshing data when ajax requests data many times in jquery".

A situation occurs when the ajax of jquery requests data frequently or repeatedly, that is, the non-ie browser is normal, and the ie browser will set the cache so that it will not be refreshed on the second request. The system reports 304not modify.

Solution:

The ajax method of jquery provides the configuration parameter: cache, (just set the property to false)

Details:

Cache:Boolean

Default: true, when dataType is "script" and "jsonp", the default is false. If set to false, the browser will not cache this page.

The above is all the contents of this article entitled "how to solve the problem that ajax does not refresh data when requesting data many times in jquery". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Data questions content browsers articles browsing time caching learning help frequency parameters just that is properties situations schemes methods easy to understand more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple macOS Shulou Information Xiaomi Microsoft