Weird Thoughts From Eric's Head

Tags - Categories : All | AJAX | BUSINESS | PERSONAL | PROGRAMMING | BOOK REVIEW

Ajax: Pop Up Blockers are an Ajax Developer Problem?

Well pop up blockers have been known to drive developers insane when they block windows that are needed in the application. Well I just found out that some pop up blockers are destroying the lives of Ajax Developers too. I never thought that would be the case until I saw it with my own eyes.

As I always mention, I write all of the clientside errors to the server log on my application so I can spot problems that I would never see. The other week I saw an error message saying I had a bad response from the server. This check is a regular expression that expects a correct format from the server. When it detects an incorrect format it dumps the message to the log.

So in my log I see the error message and responseText string returned from the server. To my surprise I saw a wonderful injected code of a pop up blocker. The pop up blocker which I could identify was the Proxomitron Anti-popup code. The other blocker code I saw was too generic to determine what one it was.

So that means if you are expecting a certain format to be returned from the server, it may not be the case since a pop up blocker may inject code into the XHR response. That is why I stress you have to validate the data coming from your server on the client before using it. Make sure it is what you expect!

This is just one more thing to add to your plate when you are developing an Ajax application. Outside parameters you can not test for and can not control, but do affect your user’s experiences.



Eric Pascarello
Coauthor of Ajax In Action
Moderator of HTML/JavaScript at www.JavaRanch.com
Author of: JavaScript: Your Visual Blueprint for Dynamic Web Pages