Home > Web Front-end > JS Tutorial > jQuery ajax cache cache problem_jquery

jQuery ajax cache cache problem_jquery

WBOY
Release: 2016-05-16 18:24:07
Original
849 people have browsed it

Use $.ajax in jquery
Then, when specifying the ajax attribute, use: 'false'.

The hateful javascript feature appears here.

In jquery, most of the time, attributes are quoted with ''.
Otherwise it is easy to become a variable name. For example, red, whether cited or not, is almost the same. But it can be recognized if it is caused. So the habits are all aroused.


However, false is a special case.
If raised, the result will be:
'false' is treated as true. Because only the empty string is true.


For example: enter in the browser address bar:
javascript:alert('false'?'true':'false');
The result will be: true.


Direct result: the ajax request is not re-requested, but fetched from the cache. The result will be completely different from what you thought. . . .

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