Technical Note: Delays Debugged

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

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? 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

► 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.

Aggressive tentacles penetrating nearly every nation on earth.

TwitterFacebook
LGF Pages
Recent Pages

researchok
'I Was Looking Forward to a Quiet Old Age': Instead, Etta Shiber, Helped Smuggle Stranded Allied Soldiers To Freedom
1 hour, 6 minutes ago
Views: 34 • Comments: 0
Tweets: 0 • Rating: 0

Daniel Ballard
Late Afternoon Light-Kalanchoe
8 hours, 48 minutes ago
Views: 87 • Comments: 0
Tweets: 0 • Rating: 3

MikeySDCA
Colin Powell Endorsed Same-Sex Marriage Once It Was Safe, More Evidence He's Hardly a Great Leader.
8 hours, 51 minutes ago
Views: 107 • Comments: 1
Tweets: 0 • Rating: 0

Eclectic Infidel
City College of San Francisco Budget Update
9 hours, 40 minutes ago
Views: 105 • Comments: 0
Tweets: 0 • Rating: 0

Michael McBacon
Kansas governor signs 'Shariah bill' to ban Islamic law
14 hours, 10 minutes ago
Views: 213 • Comments: 6
Tweets: 0 • Rating: 5

Aigle
National Geographic Traveler Veers Off Track
1 day, 14 hours ago
Views: 435 • Comments: 7
Tweets: 0 • Rating: -5

MichaelJ
Apple TV Slated to Debut in December?
1 day, 15 hours ago
Views: 215 • Comments: 0
Tweets: 0 • Rating: 1

Ascher
Israeli Who Saved Turk on Everest: You Never Abandon a Friend - Israel News, Ynetnews
1 day, 16 hours ago
Views: 290 • Comments: 1
Tweets: 0 • Rating: 3

Haywood Jabloeme
The Harrassment of Patterico & Its Roots in Left-Wing Activism
1 day, 16 hours ago
Views: 508 • Comments: 2
Tweets: 0 • Rating: 4

Curt
Brian Banks: (Video) Falsely accused of rape speaks out
1 day, 19 hours ago
Views: 261 • Comments: 2
Tweets: 0 • Rating: 4

 Frank says:

I like having the capitol of the United States in Washington, D.C., in spite of recent efforts to move it to Lynchburg, Virginia.