Ajax2-solve cache problems-php (28), ajax2 cache _ PHP Tutorial

Source: Internet
Author: User
Ajax2-solve cache problems-php (28) and ajax2 cache. Ajax2-solve cache problems-php (28), ajax2 cache 5. ajax quick start ajax code: Php program: Php code: two numbers and seven for ajax computing. For more information about cache resolution, see ajax2-cache resolution-php (28) and ajax2 cache.

V. ajax quick start

Ajax code:

Php program:

Php code:

Ajax calculates the sum of two numbers

7. solve cache problems

The above problems:

Change addition in php to subtraction

If the preceding request parameters are used, addition is still applied. if the new request parameter is used, subtraction is performed.

Solution 1: random number

Math. random ();

Solution 3: Set the request header

SetRequestHeader ("If-Modified-Since", "0 ");

Solution 4: Set the response header

Header ("Cache-Control: no-cache, must-revalidate ");

Callback (28), ajax2 cache 5. ajax quick start ajax code: Php program: Php code: ajax calculate two numbers and seven. Solve the cache problem and above...

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.