A script on this page is causing Internet Explorer to run slowly. If it continues to run, your comp

Source: Internet
Author: User

A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive

[Problem description]

On the page containing Ajax, call the data layer method to update the database. The content of a field is long and contains more than 0.1 million characters.

The access process uses htmlencode and htmldecode.

The problem is:

1. If you enter more than 0.1 million characters or more than 0.2 million characters, the system runs normally.

2. Copy a section with special characters such as ";/span & gt; & lt;/P & gt; & lt; P class = msonormal", in special format, htmlCode, JavaScript code, Web. config file configuration section:

(A) when the number of words is small (about 10 thousand words), it runs normally.

(B) When there are many words (more than 50 thousand words), the following error message is displayed:

After an error message is displayed, the webpage function becomes invalid, and clicking the button on the page does not respond.

I followed up and found that the pop-up of the error dialog box was completed on the server side, while the Ajax endrequest event was not triggered yet.

I tried the following methods:

1. server. scripttimeout = 20. No.

2. Modify executiontimeout in server. scripttimeout and web. config to a smaller value. No.

3. htmlencode and htmldecode are not required.

 

What the hell is going on? How can this problem be solved?

Don't tell me not to enter those characters. All the characters must be input.

Please advise. Thank you.

 

[Solution]

Do it yourself:

It turns out that when there is a lot of data in a DIV, when the DIV value is changed through the control on the page, the operation will be slow or this prompt will appear.

So my solution is:

When a request occurs for the control that triggers this Div change, first clear or set the DIV value to a very simple value, such as "processing ...", Then, the value is assigned back at the end of the request.

This is easily implemented through initializerequest and endrequest of pagerequestmanager in Ajax.

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.