Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

IE8 uses ajax to access sample analysis that cannot be refreshed every time.

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article shares with you the content of the sample analysis that IE8 can't refresh every time with ajax access. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Introduction to AJAX

AJAX = Asynchronous JavaScript and XML (asynchronous JavaScript and XML).

AJAX is not a new programming language, but a new way to use existing standards.

AJAX is the art of exchanging data with the server and updating parts of the web page without reloading the entire page.

The problems that cannot be refreshed every time IE8 access with ajax are described as follows:

Recently, it has been found that using ajax to access the background and ie8 access can return a normal value for the first time, and then the background will not be executed all the time, always returning the result of the first visit.

There is no problem with ie9,ie10, chrome, and other browsers.

After testing, it is found that ie8 caches the results obtained the first time, so the second time will not be submitted to the background.

Add a random number to ajax's request so that each request is inconsistent and ie will not get the result from the cache.

For example, add ".... & random=" + Math.random () after the ajax request; so that each request is inconsistent and ie will not fetch the result from the cache.

Thank you for reading! On "IE8 ajax access can not be refreshed every time the sample analysis" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, you can share it out for more people to see it!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 219

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report