Technical Note: Delays Debugged

Charles Johnsonfollow me on twitter
Sun Feb 17, 2008 at 6:01 pm PST • Views: 128

That typing delay problem I mentioned earlier, that showed up in the comment posting form and the link posting forms?

It’s history.

The excruciatingly technical reason, because some geek somewhere may benefit from it:

Turns out that some browsers are much slower at performing the Javascript innerHTML() function than others. I mean, much slower. Safari is reasonably fast, and Internet Explorer isn’t too bad, but this is one area where Firefox 2.0.0.12 really bites.

And in a recent refactoring effort, I changed the code that counts the number of characters you type into our text entry fields, to use the innerHTML method of displaying the count. That was my mistake, because I didn’t realize how badly Firefox bites in the innerHTML department.

Now, instead of using the innerHTML method of a SPAN element, the character count is displayed with a text INPUT element, and to display the count as you type, the jQuery code changes the value attribute of that text INPUT.

Which turns out to be a lot faster in all browsers, and that annoying, thoroughly bogus type-ahead slow-down is now a thing of the past.

One bug slain.

Advertisement

499 comments

^ back to top ^

Name:

Pass:

Register Forgot Your Password? Account Settings Re-send Confirmation (To log in, cookies must be enabled in your browser!)

Turn off ads by subscribing!
For about 33 cents a day, our subscription option turns off all advertisements at LGF!
Read more...


► LGF Headlines

  • Loading...

► Tweeted Articles

  • Loading...

► Tweeted Pages

  • Loading...

► Top 10 Comments

  • Loading...

► Bottom Comments

  • Loading...

► Recent Comments

  • Loading...

► Tools/Info

► LGF Hits

► Resources

► Never Forget

► Statistics

► Tag Cloud

► Contact

You must have Javascript enabled to use the contact form.
Your email:

Subject:

Message:


Messages may be published in our weblog, unless you request otherwise.
Tech Note:
Using the Contact Form

More Partners

Compare Electricity Prices in your area. Texas Electricity is deregulated; you have the right to choose Texas Electric Rates from among many Texas Electric Companies.

Chunks of funk.

TwitterFacebook
LGF Pages
Recent Pages

Bob Dillon
Mossad Bolsters Activity in Tunisia
7 minutes ago
Views: 7 • Comments: 0
Tweets: 0 • Rating: 0

Bob Dillon
CA Prison Officers Spent More Than $1 Million on Political Advice
17 minutes ago
Views: 6 • Comments: 0
Tweets: 0 • Rating: 0

Bob Dillon
China Withdraws Support to Assad
24 minutes ago
Views: 19 • Comments: 0
Tweets: 0 • Rating: 0

Bob Dillon
'Assad Using Chemical Warfare in Homs Attack
27 minutes ago
Views: 12 • Comments: 0
Tweets: 0 • Rating: 0

Bob Dillon
Weapons: Neutering Ammonium Nitrate
37 minutes ago
Views: 18 • Comments: 0
Tweets: 0 • Rating: 0

Randall Gross
Stabenow Up 14 on Hoekstra as Ad Backfires - Public Policy Polling
1 hour, 13 minutes ago
Views: 63 • Comments: 0
Tweets: 0 • Rating: 0

Randall Gross
Youth for Western Civilization Takes 'Patriot' Plunge
1 hour, 24 minutes ago
Views: 58 • Comments: 0
Tweets: 0 • Rating: 0

Randall Gross
'Sovereign Citizen' Sues Government Over Grammar
1 hour, 28 minutes ago
Views: 67 • Comments: 0
Tweets: 0 • Rating: 0

Randall Gross
Apple 'Determined' to Improve Conditions at Plants in China
1 hour, 47 minutes ago
Views: 55 • Comments: 0
Tweets: 0 • Rating: 1

Randall Gross
Something From Nothing - a Conversation W/ Richard Dawkins & Lawrence Krauss
1 hour, 49 minutes ago
Views: 61 • Comments: 0
Tweets: 0 • Rating: 0

 Frank says:

People who think of videos as an art form are probably the same people who think Cabbage Patch Dolls are a revolutionary form of soft sculpture. -- Zappa on videos (obviously) from Viva Zappa - Biography