Saturday, January 7, 2012

Duplicate POST in JQuery mobile

Last week I was looking at the requests made by a JQuery application, and I noticed that a POST was being executed twice. After doing some debugging, I thought this was a JQuery mobile issue since my code was doing only one POST. There's nothing more undesirable because we didn't want to change the JQuery mobile code, and even though JQuery mobile does frequent releases, we needed the fix right away.

Long story short, it turned out the whole problem was caused by an IMG tag with an empty src attribute. In other words, we had <img src="" alt....>. It's hard to explain why this error can cause a double POST.

No comments: