The traditional way to test for websockets is this: Although the above example will be technically correct for modern browsers it is important to consider some of the “experimental” implementation of this feature in earlier FireFox (Mozilla) browsers. In FireFox (Mozilla),