AJAX is good, but in many instances it sucks. Case and point: the listings of the Merrcury Engine (for example: http://nacho.letmego.com/). We wanted visitors to be able to send a message to the hosts without having to leave the listing. We did this via modal windows that use AJAX. Sounds good in theory, but terrible in practice. Here are the challenges we came across:
- Modals don’t work properly in mobile browsers.
- They are bad for SEO, as they add a lot of Javascript to the code.
- If you are not signed in, we have to ask you to leave the listing anyway, so that you can sign in or sign up.
- In order to circumvent the issues above, we ended up making the code dynamic, which in turn gave us a lot of headaches when setting up a caching mechanism for the listings.
The solution? Get rid of modals windows and AJAX. Starting next week, travellers will be shown a new page when they decide to contact the hosts. All problems above are solved by this. In fact, today I’m QAing this simplification, coded by @tufla, in our dev servers.
Photo by qisur



