Case sensitivity and ColdFusion 10 WebSockets

This post is more than 2 years old.

During my presentation yesterday, a user asked about case sensitivity and WebSockets. The short answer is - they are not. Given a ColdFusion application that defines a channel called "news", you can ignore case everywhere. That includes:

  • The cfwebsocket tag subscribeTo argument
  • The JavaScript object's publish and getSubscriberCount methods
  • Server-side functions like wsGetAllSubscribers and wsPublish
  • Subchannels. You can subscribe to news.sports and then broadcast to NEWS.SPORTS and the right people get the message.

There are a few more things I could test, but I think it is pretty clear that case sensitivity is not an issue.

There is one small nitpick to this. When you define the name of the JavaScript variable in the cfwebsocket tag, that string is case-sensitive. That makes sense as JavaScript variables are case sensitivite. But it looks like all WebSocket channels are going to be case insensitive.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by JP posted on 6/5/2012 at 9:59 PM

Thanks Ray... nice presentation, easy to follow. I look forward to using WebSockets in the future. I'm a little unclear about fallback with Flash for IE and other browsers that support WebSockets... maybe a topic for a future post.

Comment 2 by Raymond Camden posted on 6/5/2012 at 10:13 PM

What is unclear? It just works. :)

Comment 3 by JP posted on 6/5/2012 at 10:21 PM

I see... so I don't have to do anything? That's all handled by CF?

Comment 4 by Raymond Camden posted on 6/5/2012 at 10:25 PM

Yep. I had a demo of that - but during the preso IE launched with Flash turned off - I couldn't remember the UI to get to the plugins - and I skipped past it.

Comment 5 by JP posted on 6/5/2012 at 10:27 PM

That's where I was a little confused... thanks Ray!