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

        +1

      • 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老虎机

    那个修炼者刚从常山的元神攻击之中清醒过来,常山出现在了他的身边,以封印之力封印了他的修为,然后强行将他的魂珠吸了出来。
    大发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.
    Cheers!

    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://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://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全讯网超级大白菜

    话一说完,两个“双体朱彤”就同时将腰间的大典太拔出。两股由刀光组成的交错乱流风暴就冲向尹旷。那一道道刀光银线,竟然将尹旷全部的闪避路线都封锁了起来,让他无处可躲。
    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

    “当然了……”楚修尘的笑容依旧的灿烂无双,璨然的眸子之中,华光蔓延:“你们想要杀我的女人……你说,我可能与你们善罢甘休的吗?”
    乐天堂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平台

    不过这时候是男耕女织的时代,女人出去做活还是难以让人接受,所以这又是一大难事,只要解决了这件事,杨暕就会考虑增加一个兵种——医护兵,一旦医护兵出现,那么战争士兵的伤亡将会大为减少,这几次攻打江都和洛阳有一部分本有机会能够活命的受伤士卒因为伤口处理不当而死亡,有一部分本来有机会痊愈的也是因为伤口的感染而终身残疾,所以专业的医护人员出现也迫在眉睫,而且在全是阳刚之气的军中,加入一缕阴柔之气,那些士卒在看到有这些医护兵的出现,那么不管是训练还是打仗那个战力就会上几个台阶。
    HG平台

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

    “好烫啊!烫死我了!”魏明的大嗓mén吼道。白戮也大声吼道:“这雾是什么鬼东西!大家快点离开,这雾具有腐蚀xìng!”
    http://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.
    Cheers!

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

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

    待到整个星阵之中的灵气停止了波动,常山发现星阵内的星力还不够浓郁,于是又在墙壁之上布下了第二个聚灵阵。
    http://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稳赚技巧

    “这个先不急,徐圆朗掀不起大的波浪,先让他蹦跶两天,等懋功班师之后先收拾了沈法兴再来收拾他。”既然他得到了江都,那么周围的富庶地带不可能放过,虽然这时候也只是刚刚开始开发,但是地理优势绝对比历城要强的多了,就连青州都可以变得繁华起来,更何况是江南地带。不过杨暕对于沈法兴一直不来归顺耿耿于怀,就连掌兵十万的杨义臣都识趣的归顺了,他沈法兴难道还想要要他亲自去请?对于这种不识趣的,杨暕唯有将他打得服服帖帖而已。
    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://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.