Blog Post RSS ?

Blogs » JavaScript & CSS » AJAX Gotchas
 

AJAX Gotchas

by Kevin Yank

Alex Bosworth has compiled a list of “gotchas” that new AJAX developers seem to fall prey to on a regular basis. He has also posted the list on a wiki so that readers can contribute their own common AJAX pitfalls.

Among the list of gotchas was this gem that lends greater weight to my recent coverage of character encodings:

Ajax uses UTF-8. Normal forms are sent using the encoding of the parent page. Thus a SJIS encoded page will default to sending form content encoded in SJIS. Ajax submitted forms on the other hand will be sent as UTF-8. If for some strange reason, UTF-8 is not the character set of choice for the server, this will require a solution such as the server recognizing and translating UTF-8 responses to a desired character encoding.

For PHP developers especially, where limited out-of-the-box support for UTF-8 keeps many sites on single-byte character encodings, this issue could cause nasty surprises indeed. For example, if you want to add the ability to submit a form via AJAX and keep the standard submission method as a fallback, you could potentially end up having to support two different encodings for that submitted data!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Ping.fm
  • Twitthis

Related posts:

  1. Are You Violating the Eolas Ajax Patent? It's true: Eolas has an Ajax patent and is filing...
  2. Gotchas in the Cloud: 4 Traps for the Unwary Before you farm out all your business systems to a...
  3. 10 Things to Check Before Using a CAPTCHA Hacking attempts and spam bots are your problem - not...
  4. Do Your Web Forms Suck? Most web forms suck—whether that's because of poor usability, a...

This post has 9 responses so far