Getting the Flex-AJAX Bridge (FABridge) working in Chrome

Very brief blog post.

I've been working on my longpolling blog posts trying to resolve why I'm having problems with the dynamic channel creation with ColdFusion 9.0.1.

I've been trying to call my application from Firefox and Chromium on the same laptop. Firefox has been working beautifully, but Chromium 10 has not been playing nice.

Finally (I can be a stubborn fool sometimes) I decided to check from Internet Explorer, Safari and Firefox from my desktop all of which work first time, but Chrome just wasn't working.

So brain engages and I google "FABridge Chrome". The very first entry that turns up is this one on Tim's Blog called FABridge plays nice with chrome. In it Tom points out a bug in the javascript of FABridge.js, specifically the FABridge__bridgeInitialized function. This function does a browser test, but doesn't include Chrome. Add a check for Chrome and everything starts working just as it should!

For the record this is the change :

In FABridge.js if you change: if (/Explorer/.test(navigator.appName) || /Konqueror|Safari|KHTML/.test(navigator.appVersion)) to: if((!(/Chrome/.test(navigator.appVersion))) && ((/Explorer/.test(navigator.appName) || /Konqueror|Safari|KHTML/.test(navigator.appVersion))))

Thank you Tom! Much appreciated! Only wish I'd looked sooner!

TweetBacks