Home > Web Front-end > JS Tutorial > body text

Solution to the problem of jquery ajax not refreshing when requesting data multiple times

韦小宝
Release: 2017-12-30 19:15:14
Original
1590 people have browsed it

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

Explanation of the traditional ajax implementation of user name verification and jquery's $.post method

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!