HTML and CSS Reference
Chapter 7. Going
WebSockets, as their name implies, is something that uses the web. The web is usu-
ally interwoven with browser pages because that's the primary means of displaying
data online. However, non-browser programs too use online data transmission. The
release of the iPhone (initially) and the iPad (later) introduced a brand new world
of web interconnectivity without necessarily using a web browser. Instead, the new
smartphone and tablet devices utilized the power of native apps to offer a unique user
Why mobile matters
Currently, there are one billion active smartphones out there. That is, millions of po-
tential customers for your applications. Those people use their mobile phone to ac-
complish daily tasks, surf the Internet, communicate, or shop.
Smartphones have become synonymous to apps, and nowadays, there is an app for
any usage you can think of. Most of the apps connect to the Internet in order to re-
trieve data, make transactions, gather news, and so on.
Wouldn't it be great if you were able to use your existing WebSocket knowledge and
develop a WebSocket client running natively on a smartphone or tablet device?
Native mobile app versus mobile website
Well, this is a common conflict and as usual, the answer depends on your needs and
your target audience. If you are familiar with the modern design trends, designing a
website that is responsive and mobile friendly, is now a must. However, you should be
sure that the content, which is what really matters, is equally accessible via a smart-
phone, as it is via a classic desktop browser.
Definitely, a WebSocket web app will run on any HTML5-compliant browser, including
mobile browsers such as Safari for iOS and Chrome for mobile. So, no need to worry
about compatibility issues on modern smartphones.