Is ajax cached? Is ajax cached? I mean, for example, there are no cache-like operations for the same request? You do not need to query the database! Is php used for data caching ?, You can use js on the client. If the same request directly retrieves the data in the cache. Php is also acceptable ., I think this problem exists if ajax is cached. When you transfer data ajax, is there a cache?
Is ajax cached? I mean, for example, there are no cache-like operations for the same request? You do not need to query the database! Is data cache implemented using php?
------ Solution --------------------
You can use js on the client. If the same request directly retrieves the data in the cache.
Of course, php is also possible.
------ Solution --------------------
I think this problem exists if ajax is cached. When you transmit data, you can use time as a variable for transmission. This avoids cache generation.
------ Solution --------------------
You can cache the ajax request page on the client for XX seconds.
Set the Etag Cache-Control Expires and other information to Control the Cache time.
In addition, do not add Math. random () to ajax requests ()
------ Solution --------------------
By default, IE has a cache. when you call the same URL, the cache is directly returned for the second time, and no operation is performed on the server. Firefox and Google Wood.
However, you can set it. for example, when setting a URL with a random number, or set cache-control to no cache.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service