Home > Article > Web Front-end > Solution to the problem of jquery ajax not refreshing when requesting data multiple times
The following editor will bring you an articlejquery Ajax does not refresh the problem when requesting data multiple times. The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. For ajax, follow the editor to see how jquery ajax does not refresh when requesting data multiple times.
There is a situation when jquery's ajax frequently requests data or repeatedly requests data, that is If the ie browser is not normal, the IE browser will set the cache, resulting in the second request not being refreshed, and the system will report 304 not modify,
Solution:
jquery's ajax method provides configuration parameters: cache, (just set the attribute to false)
Details:
cache: Boolean
Default: true, when dataType is "script" and "jsonp", the default is false if set If false, the browser will not cache this page.
The above is the entire solution to the problem of jquery ajax not refreshing when requesting data multiple times brought by the editor. I hope everyone will support the PHP Chinese website~
Related Recommended:
Simple method to achieve ajax three-level linkage effect
Detailed explanation of ajax implementation example of input prompt effect
The above is the detailed content of Solution to the problem of jquery ajax not refreshing when requesting data multiple times. For more information, please follow other related articles on the PHP Chinese website!