Reload failure solution for datagrid in EasyUI under ie _ jquery

Source: Internet
Author: User
This article mainly introduces the reload failure solution of datagrid in EasyUI under ie, and finally solves this problem based on several solutions collected on the Internet, I hope this will help you. Problem

I recently used EasyUI to develop the background system and found a strange problem during the test, $ ('dg '). datagrid ('reload'); when the table data is reloaded, ie does not respond at all. Later I found that the browser uses the cache instead of being unresponsive.

Solution

The solutions summarized by online users include:

1. Add a timestamp after the url so that the url accessed in the first load and reload is inconsistent, so that the system cannot use IE cache. Tests show that the EasyUI request is followed by a string of random numbers _ 145232xxx, but ie still uses the cache. Later, I added the rand = xxx (random number generated by Math. rand () to the url in the request js and won't use the cache. (I tested ie8 to ie11)

2. SimilarChina-Canada To clear the cache:

The Code is as follows:





Unfortunately, like many netizens, I have failed this method. :(

3. Declare the method corresponding to the load of the datagrid as 'post'. This solution is the fastest. But there are several problems:
• If the server interface does not support the POST method, stop.
• If the server interface can be controlled by itself, this method of front-end compromise will make the interface not RESTful at all! You must know that RESTful interfaces are basically designed in GET mode for queries.

Summary

Therefore, it is still the first method. It is easy to add random numbers in the url. Forgive me for not wanting to change the server interface _ (: blank "blank )_.

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.