The example in this article describes the caching processing solution for Ajax get requests. Share to everyone for your reference. The specific analysis is as follows:
Many times in the Ajax get method call, because the cache is not timely access
ajax:asynchronous JavaScript and XML asynchronous JavaScript and XML.
is a Web development technology that creates interactive Web applications.
1.0 Advantages:1.1 improves the user experience through asynchronous mode.1.2 optimizes the
Ajax cross-domain request data in Google Firefox my local IE11 is no problem.
Let the test found the problem, IE8 request not to the data, and then I look at their own write JS to see if there is no incompatibility problem, but there is no ah, why
If improper handling will affect the user experience, it may also produce inexplicable problems.
Combined with their own thinking and online related content reference, give the following solutions. Each scenario has different pros and cons,
Well, as the saying goes, easier said than done, put on the programming is easy to make up the difficulty, although there is no new technology Ajax, but the transformation of ideas and the integration of old technology, but to move hands or problems,
The client collects the form information.
Submit to the server using the XMLHttpRequest object.
The server completes the validation logic and returns the result information.
The browser side makes certain prompts to the user based on the information
If we use AJAX technology to do the above, we don't have to wait for the server to return information. When a user enters a user name or enterprise name, when the input text box loses focus, the request is automatically made to the server, and the
Here's my program.
Html:
Copy Code code as follows:
Untitled Page
Please enter your name:
REQUEST.ASHX:
Code
Copy Code code as follows:
Using System;
Using System.Web;
public
This is to reduce the frequent access to the server caused unnecessary burden on it, but also brought some special business logic can not meet the problem.
For example:
You need a select Drop-down list at the front desk as an AJAX trigger entry,
Copy Code code as follows:
The following is the full text of this article:
XMLHttpRequest the default is to pass data with UTF-8. When the server-side return data is UTF-8 encoded, it works well (developing Web applications, when the
Theoretically, Ajax technology can reduce the waiting time of the user's operation and save the data traffic on the network to a great extent. However, the reality is not always the case. Users often complain that the AJAX system responds less
Eclipse Debug does not enter an action when the XML document returned by response in 1.ajax,action is malformed.
2.ajax cache problem, you need to join Xmlhttp.setrequestheader ("If-modified-since", "0″"), you can solve.
3. If not AJAX submission,
1. The front and back end should do a good job of security checks
Can not rely on the front-end to do security verification work, the back end must have a filtration mechanism to test the data from the front. Since Ajax also receives data from the
Copy Code code as follows:
/**
* @author Supersha
* @QQ: 770104121
*/
ajax document
Comments:
An Ajax object accepts an object literal as a parameter that contains the Method,url,success,params,fail parameter
Method:
This example describes the Ajax simple test code. Share to everyone for your reference. Specifically as follows:
Client: code as follows: (ajax_test.html)
Untitled document Send
Server side: code is as follows:
Objective
Ajax, with the pale words of praise: very good.
We can use AJAX to achieve asynchronous data acquisition, reduce server operation time, greatly improve the user experience; we can use Ajax to implement small system combination large
When there are many form data items, it becomes inefficient to manually get the values of the table items, combined with the function serialize () provided by jquery, which enables you to quickly get data and submit the form data.
Take a look at
One of the problems that you encounter when you do an AJAX login
When the incoming parameter contains special characters, such as: "$ ' #@" and so on. There is a problem with parameter passing and cannot get it correctly.
$.ajax ({
URL:
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.