Resolving AJAX only triggers a workaround for not updating the cache

Source: Internet
Author: User
Tags add current time
Ajax| Solution | Cache today is doing JSP and backend connection, with Dojo's default Ajax submission code, began to read out the data,
Later I changed the data in the database, again set out just the data, found that the front desk called the method, but then indifferent. After checking some information, we found the solution.

Because it's a xmlhttprequest cache problem.
If you use get to submit data to a previously submitted address and read the data before you read it without going back to the background to reread the data workaround there are two

1 is to change method to post

2 If you must use GET, then add a &a= at the end of your submission parameter, and the most common is to add the current time to the "+new Date" (). GetTime () Add this after the argument

It's settled.

Related Article

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.