Technical Note: Delays Debugged

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

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.

Would you like fries with that?

TwitterFacebook
LGF Pages
Recent Pages

researchok
Proposed Mosques Spark Opposition in Some U.S. Communities: 'Don't look at me just as a Muslim, look at me as an American'
1 hour, 7 minutes ago
Views: 37 • Comments: 0
Tweets: 0 • Rating: 0

MikeySDCA
How an 11-Year-Old Survived the Houla Massacre - the Atlantic Wire
1 hour, 48 minutes ago
Views: 49 • Comments: 0
Tweets: 0 • Rating: 1

Randall Gross
Fairbanks Militia Leader Compared to Cult Leaders
2 hours, 32 minutes ago
Views: 78 • Comments: 0
Tweets: 0 • Rating: 1

Haywood Jabloeme
SWATting the Ericksons
18 hours, 47 minutes ago
Views: 208 • Comments: 2
Tweets: 0 • Rating: -4

Mostly sane, most of the time.
So wake up and notice already
18 hours, 55 minutes ago
Views: 125 • Comments: 0
Tweets: 0 • Rating: 1

Daniel Ballard
Late Afternoon Light-Kalanchoe
1 day, 23 hours ago
Views: 215 • Comments: 0
Tweets: 0 • Rating: 5

Eclectic Infidel
City College of San Francisco Budget Update
2 days ago
Views: 254 • Comments: 0
Tweets: 0 • Rating: 1

Aigle
National Geographic Traveler Veers Off Track
3 days, 4 hours ago
Views: 896 • Comments: 29
Tweets: 26 • Rating: -6

MichaelJ
Apple TV Slated to Debut in December?
3 days, 6 hours ago
Views: 315 • Comments: 0
Tweets: 0 • Rating: 1

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

 Frank says:

Did anybody dance? -- Said after performing the highly, shall we say, evolved "Black Page #2" on "Zappa In New York". (And as you probably already know, this was the song that alerted FZ to the existance of his stunt guitarist to be,Steve Vai, after recieving a sheet music transcription of the song, made by young master Vai.)