Ajax| Error
Read Dflying Chen introduced an AJAX article just like practicing English translation, because of their limited level, please criticize
The author of this article is the author of the well-known. NET Ajax framework Ajax.NET Professional (Ajaxpro) Michael Schwarz
Last month I found that many of the Web2.0 sites used Ajax extensively, but some of them were strange because they were slower than before and sometimes didn't work (on mobile devices), I summed up 10 Ajax errors (platform-independent)
1. Do not update the entire page by placing the entire page in UpdatePanel. You need to save time while you run the Web page, and don't update those parts that can use JavaScript and DHTML (DOM).
2, always remember that there are so many visitors, they can not use JavaScript or the version of the older browser or they do not support JavaScript, such as mobile devices. If none of this is supported, what can your visitors see?
3, in the client browser cache the same request or on the we server to execute the cache. The best example is to automatically complete a drop-down menu, their fill at any time is the same, an automatic completion of the wrong way of writing can slow down your Web server (database server), because there will be more than previously used IsPostBack request. Think about the situation where you keep pressing F5 to refresh your Web page. If you have a cascading pull-down menu, you'll settle for more requests.
4, when you use CSS or JavaScript, do not run, concurrent or run for a long time Ajax requests, the general browser can only have two concurrent HTTP connection (I know can be changed this, but the default is set to two). If you read a picture by a lot of Ajax requests, the speed will become very slow.
5, when all use the method of asynchronous call send XMLHttpRequest ... If you want to use the Synchronized method is also not to ask questions, your browser will not be because of network problems or slow connection speed and frozen
6. Try to get your Web application to use a slow network connection and try a fast TCP/IP connection
7. Is your Web application a substitute for desktop programs? You've looked at the use of memory in a typical browser that runs your Web application for an hour, two hours, or days. Not everyone has a good machine like you.
8. Check your Http request status codes (status code) when you return to XMLHttpRequest, and there will be some common network errors like Dns,http Server Error 500, where you have checked the status code Code), it can tell you the browser in a mode for the connection
9, try to prohibit XMLHttpRequest object! With IE7 you can use native object instead of ActiveX object, but you can also ban native object.
10, check your AJAX requests security! Did you simply open up your data access layer? Make full use of FormsAuthentication and principalpermissions. Is it possible for anyone to create a request (not just click on a link)?
Http://www.cnblogs.com/AllenWei/archive/2006/11/26/573198.html