We’re very excited to announce the release of a massive new update to our Javascript client library. The new release adds a smarter connection strategy with additional fallback mechanisms such as HTTP-based transport. These changes further improve our support for legacy devices and network complications such as corporate firewalls.

The Javascript client library is our most widely used library. Its aim is to quickly and reliably connect browser based clients to Pusher. Connectivity is a very fundamental aspect of our service and we’ve put a lot of thought into making it the most comprehensive and considered connection manager available.

We’ll be releasing updates to other client libraries including the iOS and Android ones in the coming months.

The changes in brief

The new version of pusher-js introduces a completely re-worked connection strategy, and adds several HTTP transports to our range of fallbacks. The result is much more comprehensive device compatibility, reduced time to connect, and a host of other improvements.

As well as showing the benefits of the changes, this post will also attempt to show how we approached the problem, and some of our design decisions.

Why we’ve rethought the transport mechanism

One of the things that is important to point out is that the new transports are an extension of our fallback options. This release should in no way detract from our ongoing philosophy that WebSockets are the most awesome way of communicating with a centralised server. This version of the pusher-js client is an attempt to make the world a more bearable place for those people who, for whatever reasons, are incapable of using the best transport available.

Complementing our existing fallback

Pusher has always worked across a wide variety of devices via a Flash based fallback mechanism, and we haven’t replaced this option in the newer version. Since the Flash version uses the WebSocket endpoint, it gets all the low latency, low overhead advantages of WebSockets. The drawbacks with this approach are that it involves downloading extra files, Flash isn’t installed on every browser, and certain ports need to be open on the client’s network.

Why we didn’t do it earlier

Adding additional transports is time consuming, and doing it right was very important. We needed to do it in such a way as to preserve the experience for the thousands of developers who use Pusher on a regular basis.

In addition to this, Pusher was initially started on the back of our excitement about WebSockets, and our goal that developers should be able to use this wondrous technology without having to throw out their existing infrastructure.

This release marks a firm commitment on our behalf to provide the perfect balance of cutting edge technology that works comprehensively for all devices.

The challenges of creating universal connectivity

In an ideal world, WebSockets would always be used. However, in some cases an alternative transport is needed, for example when WebSocket and Flash are not available on the browser, or when the network contains a meddlesome proxy or firewall (especially common on mobile networks).

The new connection strategy tries alternatives in parallel, and provides the user with a transport that works.

Remembering successful strategies

We’ve also added the ability for clients to remember successful strategies in local storage. This should result in a much snappier user experience by quickly connecting between page loads.

A metric driven approach

In our alpha tests we have tried new versions of our library with willing participants, and gathered detailed data about time to connect, and what methods are used. This has evolved our approach to a point we are very happy with. We’ll write about our methodology for this in a future post.

The library will continue to collect anonymised metrics about connections, and we will use this data to make improvements. If you’d prefer we didn’t collect stats in your application, you can disable collection via a configuration option:

var pusher = new Pusher('API_KEY',  {disableStats: true})

Getting started

To use the new library, all you need to do is to change the URL:

  • http://js.pusher.com/2.0/pusher.min.js
  • https://d3dy5gmtp8yhk7.cloudfront.net/2.0/pusher.min.js (for SSL sites)

The changelog is available here

For most apps, this will probably have an almost unnoticeable effect. Behind the scenes, your users will be getting a dramatically improved experience though.

As usual, contact support@pusher.com if you have any questions or encounter issues with the new release.

  • Ted McMannus

    Not very interesting nor is it very important news.

    • bren101

      This is huge news. It was the #1 reason I switched back to Pusher last week.

    • Matt Watson

      This is very important news for people using Pusher. This is a great enhancement that has been needed for a long time. Also brings them to par with Pubnub, SignalR, etc.

    • Jeremy Haile

      This is very important news. I switched away from Pusher a while back specifically because of the lack of HTTP fallback support. I’ll be looking at testing the new version and switching back now!

    • http://markmakes.com/ Mark Lancaster

      Disagree. Important and interesting. Thanks guys @pusher!

  • Gabe

    Would be nice if gzip compression was used for serving the js library so that the file size is smaller. Any reason you guys don’t do this?

    • http://www.leggetter.co.uk/ Phil Leggetter

      We use Amazon Cloudfront as our CDN right now and achieving this isn’t as easy as we’d like it to be. It is on our backlog.

      • Freddywang

        I second that. It will involve handling Vary: Accept-Encoding header properly and apply deflate/gzip accordingly. Sounds complicated.

        I haven’t tried this before, maybe you could try other cdn provider which comes with gzip by default. Cloudfront will point to that cdn provider as the origin, and that cdn provider will point to your host as the origin. In another way of saying, you could outsource the gzip compression part to third party.

      • Gabriel Dibble


      • Gabe

        What I do is have a cloudfront distribution that pulls directly from my own server, which handles the gzipping. Then I just set a far future expires so that requests to my server are infrequent.

      • Etienne

        Gzip on Cloudfront is easy, instead of from a S3 bucket serve it front a server that does gzip ouput compression!

  • http://www.5jinjc.com 时时彩代理

    时时彩代理 [url=http://www.5jinjc.com]时时彩代理[/url]

  • http://www.essencearticles.net/spider-man-unlimited-ios-hack/ spider-man unlimited cheats

    I always spent my half an hour to read this web site’s content
    everyday along with a cup of coffee.

    Also visit my web-site; spider-man unlimited cheats

  • http://www.patuxent-tidewater.org/gt-racing-2-hack-2014/ gt racing 2 hack v3.12

    Hey very interesting blog!

    Here is my website – gt racing 2 hack v3.12

  • http://www.shqfgg.com 大发888老虎机


  • http://blog.comnico.jp/we-love-social love

    Yeaaahhh istxfl good love! I am also thrilled…. Appreciation!Warm regards starting from Berlin/Germany

  • http://saibpp.co.za/author/jamalprichard/ Tracey

    Quality posts is the important to attract the visitors to pay a quick visit the web page, that’s what this web site is providing.

    Also visit my homepage … spider man unlimited hacks [Tracey]

  • http://www.langson.gov.vn/dulich/node/24312 head soccer hack ifile

    Hello i am kavin, its my first time to commenting anywhere, when i
    read this paragraph i thought i could also create comment
    due to this brilliant article.

    My blog post – head soccer hack ifile

  • http://www.guge08.com 黑龙江时时彩走势


  • http://www.medium-ls.com/members/deewoodleyxnii/ Sharon

    I don’t know whether it’s just me or if everyone else experiencing issues with your website.

    It appears as if some of the written text within your posts are
    running off the screen. Can someone else please provide feedback and let me know if this
    is happening to them as well? This might be a problem with my
    web browser because I’ve had this happen previously. Thank you

    Also visit my page :: spider man unlimited cheat, Sharon,

  • http://internal.okc.albanova.se/wiki/index.php/GT_Racing_2_unlimited gt racing 2 hack apk

    This design is spectacular! You most certainly know how to keep a reader entertained.
    Between your wit and your videos, I was almost moved
    to start my own blog (well, almost…HaHa!) Fantastic job.
    I really enjoyed what you had to say, and more than that, how you presented it.
    Too cool!

    Look at my blog post … gt racing 2 hack apk

  • http://www2.dcc.ufmg.br/projetos/estradarealdigital/dokuwiki/doku.php?id=profile_elmodelong brave Frontier hack

    This paragraph is genuinely a fastidious
    one it assists new the web viewers, who are wishing in favor of blogging.

    Feel free to surf to my blog brave Frontier hack

  • http://motionpd.dothome.co.kr/xe/board_Mrsx18/347412 spider man unlimited ios hack

    What’s up friends, fastidious article and nice arguments commented at this place, I am
    genuinely enjoying by these.

    Here is my web blog: spider man unlimited ios hack

  • https://ewanhangerapjvo.wordpress.com/ brave Frontier cheats

    I think what you wrote made a bunch of sense.
    However, think about this, what if you wrote a catchier post title?
    I mean, I don’t wish to tell you how to run your website, but suppose you added a post title that grabbed folk’s attention? I
    mean Pusher-js 2.0.0 released: Cutting edge WebSockets with comprehensive legacy support – Pusher Blog is
    kinda plain. You might look at Yahoo’s home page and see how they write post titles
    to get people to click. You might try adding a video or a
    pic or two to get people interested about what you’ve written. In my opinion, it could make your blog a little livelier.

    My website … brave Frontier cheats

  • http://disabled-friendly.com/members/majorw27vcbkxh/activity/1393886/ Johnson

    Great blog you have here.. It’s hard to find high-quality writing like yours nowadays.
    I seriously appreciate individuals like you! Take care!!

    Look at my weblog spider man unlimited hacks (Johnson)

  • http://www.sixtysecondparent.com/members/ofeliashannonp/activity/216187/ head soccer hack apk

    certainly like your website but you need to test the spelling on quite a few of your posts.
    Several of them are rife with spelling problems and I in finding it very bothersome to
    inform the truth on the other hand I’ll certainly come again again.

    Here is my site head soccer hack apk

  • http://carel.org.br/members/dariotreadwell/ clash of lords 2 cheats

    Hello there, I found your web site by waay of
    Google while looking for a comparable subject, your site got here up,
    it appears to be like good. I’ve bookmarked it in my google bookmarks.

    Hi there, simply changed into aware of your weblog thru Google, and found that
    it’s truly informative. I am going to be careful for brussels.
    I’ll appreciate when you proceed this in future. Numerous
    people will be benefited ouut of your writing.

    Here is my page clash of lords 2 cheats

  • http://stefano.cm.nctu.edu.tw/mediawiki/index.php/Brave_Frontier_mobile_Hack Aurelio

    Do you have a spam issue on this site; I also am a blogger, and I was curious about your situation; we
    have developed some nice practices and we are
    looking to trade solutions with other folks, why not shoot
    me an email if interested.

    Here is my homepage – brave frontier damage hack (Aurelio)

  • http://divi.tekhoi.com/members/aundreaamosdk/activity/1915002/ brave Frontier hack & cheats tool

    Hey there are using WordPress for your blog platform?
    I’m new to the blog world but I’m trying to get started and create my own. Do you require any coding knowledge to make your own blog?
    Any help would be really appreciated!

    Feel free to visit my blog – brave Frontier hack & cheats tool

  • http://www.shishicaiguanfangpt.com www.shishicaiguanfangpt.com


  • http://www2.dcc.ufmg.br/projetos/estradarealdigital/dokuwiki/doku.php?id=profile_elyseoqfafv head soccer hack & cheats tool

    Normally I don’t read post on blogs, however I would like to
    say that this write-up very forced me to check out and do it!
    Your writing style has been amazed me. Thanks, quite
    great article.

    Also visit my web page :: head soccer hack & cheats tool

  • http://www.unifiedpsychotherapyproject.org/psychotherapedia/index.php?title=Working_Brave_Frontier_Hack Aileen

    I am curious to find out what blog system you have been using?

    I’m having some minor security problems
    with my latest site and I would like to find something more
    risk-free. Do you have any suggestions?

    Have a look at my blog post – download brave frontier mod, Aileen,

  • http://divi.tekhoi.com/groups/brave-frontier-cheats/ brave frontier cheat

    Hi there, after reading this amazing paragraph i am too delighted to share my knowledge here with friends.

    Take a look at my web-site: brave frontier cheat

  • http://gfzarchitects.net/ww/GT_Racing_2_Hack_v3.12 gt racing 2 free download

    Wow that was strange. I just wrote an extremely long comment but after I clicked submit my
    comment didn’t show up. Grrrr… well I’m not
    writing all that over again. Anyway, just wanted to say superb blog!

    Feel free to visit my webpage gt racing 2 free download

  • http://wiki.acceed.de/index.php/IOS_Spider_Man_Unlimited_Hack spider man unlimited ios hack

    An outstanding share! I have just forwarded this onto a
    coworker who was doing a little research on this. And
    he in fact bought me lunch due to the fact that I found it for him…
    lol. So allow me to reword this…. Thanks for the
    meal!! But yeah, thanks for spending some time to discuss
    this matter here on your blog.

    Feel free to surf to my blog spider man unlimited ios hack

  • http://www.mdaole.net 通宝娱乐


  • http://www.wowruler.com wow gold

    wow gold are so incredibly trendy, so model. they look beneficial with everything.

  • http://www.meiliguzhen.com www.meiliguzhen.com


  • http://stefano.cm.nctu.edu.tw/mediawiki/index.php/Spider_Man_Hack Jasmin

    Generally I don’t read article on blogs, however I wish to say that this write-up very pressured
    me to try and do it! Your writing taste has been surprised me.
    Thanks, very nice article.

    Feel free to surf to my page spider man unlimited cheat (Jasmin)

  • http://www.ydg1009.com 5060全讯网超级大白菜


  • http://www.chongqingshishicai888.com 重庆时时彩


  • http://www.severalworld.com/white/Nike-air-max-1-ACG-pack.html Nike air max 1 ACG pack
  • http://www.vogate.com 乐天堂fun88


  • http://www.shishicaipqus.com 亿发游时时彩平台


  • http://www.livingkitchensltd.co.uk/Givenchy/ Givenchy replica bags

    Just perfect & quick shipping! Thanks!
    Givenchy replica bags

  • http://www.shxysy.net HG平台


  • http://www.hunanshishicai.com www.hunanshishicai.com


  • http://www.zgxhkj.com 时时彩娱乐平台


  • http://www.du-cote-des-pros.fr/forum/topic/159310 clash of lords 2 cheats

    Hi to every one, the contents present at this website are actually remarkable for people knowledge, well, keep up the good work fellows.

    my page clash of lords 2 cheats

  • http://www.fenghuangshishicai.com 凤凰时时彩平台网址


  • http://www.fishburnhedges.co.uk/Yves-Saint-Laurent/ Cheap Replica YSL Bags

    Wonderful seller on . Great doing business with you!
    Cheap Replica YSL Bags

  • http://www.shishicaihyqc.com www.shishicaihyqc.com
  • http://propulsion.aoes.com/index.php/User:MapleFiorini spider man unlimited cheat

    Superb blog! Do you have any hints for aspiring writers? I’m planning to
    start my own site soon but I’m a little lost on everything.
    Would you suggest starting with a free platform like WordPress or
    go for a paid option? There are so many choices out there that I’m totally overwhelmed ..
    Any suggestions? Thanks!

    Feel free to visit my web page :: spider man unlimited cheat

  • http://pnwlandmod.forestry.oregonstate.edu/index.php/Game_of_War_Fire_Age_Hack.rar game of war fire age hack no download

    Hi there outstanding website! Does running a blog such as this take a lot of
    work? I’ve no knowledge of computer programming however I was hoping
    to start my own blog in the near future.
    Anyhow, if you have any suggestions or tips for new blog owners please
    share. I know this is off subject however I simply needed to ask.

    Feel free to surf to my web page :: game of war fire age hack no download

  • http://www.chengshunhe.com www.chengshunhe.com


  • https://connorverdindgr.wordpress.com/ gt racing 2 money hack

    certainly like your web site however you have to check the spelling on several
    of your posts. Several of them are rife with spelling issues and I in finding it very
    bothersome to inform the reality then again I will surely come again again.

    Feel free to visit my website … gt racing 2 money hack

  • http://www.becomeabuilder.com/ toms shoes outlet
  • http://www.shishicaiwengzhuanjq.com 重庆时时彩稳赚技巧


  • http://www.fuyaosheng.com 凤凰平台


  • http://www.11xuan5wenzhuan.com 11选5稳赚技巧


  • http://www.shishicaizmxy.com 时时彩选号工具


  • http://tinyurl.com/wheretobuygarciniacambogiaq what is garcinia cambogia

    Do you have a spam problem on this blog; I also am a
    blogger, and I was curious about your situation; many of us
    have created some nice methods and we are looking to swap methods with other
    folks, please shoot me an e-mail if interested.

    Feel free to surf to my blog post – what is garcinia cambogia

  • http://www.heilongjshishicai.com www.heilongjshishicai.com


  • http://Tinyurl.com/o6r866p garcinia cambogia pure

    Spot on with this write-up, I really believe that this site needs much more attention. I’ll probably be returning to read more, thanks
    for the information!

    my web site garcinia cambogia pure

  • http://www.shishicainyzt.com 时时彩评测网


  • http://nsajin.com/?document_srl=164246 antichrist prophecy

    Hi there! I’m at work surfing around your blog from
    my new apple iphone! Just wanted to say I love
    reading your blog and look forward to all your posts! Carry on the excellent work!

    my web-site; antichrist prophecy

About Max Williams

Max is CEO of Pusher, and is passionate about the ways that technology can be used to make life better and more enjoyable for people. He loves using APIs and developer tools, and is obsessed with finding things that can be better done by a machine. His posts tend to be about life at Pusher, and the ways that we experiment with our culture and processes to create awesome things.