Message from discussion
iOS6: Mobile Safari does not support long polling
Received: by 10.50.171.102 with SMTP id at6mr610934igc.1.1348314569811;
Sat, 22 Sep 2012 04:49:29 -0700 (PDT)
X-BeenThere: liftweb@googlegroups.com
Received: by 10.231.2.13 with SMTP id 13ls581240ibh.1.gmail; Sat, 22 Sep 2012
04:49:23 -0700 (PDT)
Received: by 10.42.73.129 with SMTP id s1mr3023454icj.21.1348314563906;
Sat, 22 Sep 2012 04:49:23 -0700 (PDT)
Received: by 10.42.73.129 with SMTP id s1mr3023453icj.21.1348314563881;
Sat, 22 Sep 2012 04:49:23 -0700 (PDT)
Return-Path: <maarten.koopm...@gmail.com>
Received: from mail-ie0-f169.google.com (mail-ie0-f169.google.com [209.85.223.169])
by gmr-mx.google.com with ESMTPS id mb9si188347igc.1.2012.09.22.04.49.23
(version=TLSv1/SSLv3 cipher=OTHER);
Sat, 22 Sep 2012 04:49:23 -0700 (PDT)
Received-SPF: pass (google.com: domain of maarten.koopm...@gmail.com designates 209.85.223.169 as permitted sender) client-ip=209.85.223.169;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of maarten.koopm...@gmail.com designates 209.85.223.169 as permitted sender) smtp.mail=maarten.koopm...@gmail.com; dkim=pass header...@gmail.com
Received: by ied10 with SMTP id 10so8500846ied.0
for <liftweb@googlegroups.com>; Sat, 22 Sep 2012 04:49:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=WerpLveqB8VQyERACGFX3GxqTbeYAcQV8/j6fom1dX4=;
b=MDlanxroMBQGRb2gvfTebS1mLw3gYJGOoj8WX87h52Vz0Cj8gbIngSGEG10j2RjQCM
hktcj1m28zFON0F56DVef7UzMa8fUUZ9n6TiegiMVygvdZnygHgqxS8KoheQyRnWJX4z
LJShT1uRq83XmWaRuNRaZhAAWFUlle9fFmeGotVpX87LcFlTbDWRyVQzg8KTJyCxXnDN
HaxlIS5A1a98yvNT13xYvOBS7wKv61z0SuDeGVAWazny6Ei17QXpSipN6XtSFOttlmrX
/PVB8F22rrW3HtYeas4+PnHfyGzyuyIqaVsGB+0QBdD1KtCauySWySiPBI5tKxW2Qa8g
8ayQ==
MIME-Version: 1.0
Received: by 10.50.85.137 with SMTP id h9mr957071igz.13.1348314563471; Sat, 22
Sep 2012 04:49:23 -0700 (PDT)
Received: by 10.50.108.66 with HTTP; Sat, 22 Sep 2012 04:49:23 -0700 (PDT)
In-Reply-To: <8e686585-0601-49b1-94cb-c0954f81c8e6@googlegroups.com>
References: <5bc21273-fc71-4dff-b04c-b3bf841fdc5f@googlegroups.com>
<1ebf7e1f-f7c4-40d3-af7b-53f030201992@googlegroups.com>
<97aedf6d-d444-401b-aea8-1edb39d68822@googlegroups.com>
<CAH6e9LhjOy6NAgB-m5ZXOSDew7YYuTATcjSDotTgkmOKvCg...@mail.gmail.com>
<8e686585-0601-49b1-94cb-c0954f81c8e6@googlegroups.com>
Date: Sat, 22 Sep 2012 13:49:23 +0200
Message-ID: <CAJ9WAGf_YftxdhsW72LKtDRw7AsYt=PaL+yXSdvHNaWdVQ1...@mail.gmail.com>
Subject: Re: [Lift] iOS6: Mobile Safari does not support long polling
From: Maarten Koopmans <maarten.koopm...@gmail.com>
To: "liftweb@googlegroups.com" <liftweb@googlegroups.com>
Content-Type: multipart/alternative; boundary=e89a8f2357ab99e78204ca48f29c
--e89a8f2357ab99e78204ca48f29c
Content-Type: text/plain; charset=ISO-8859-1
.... if you suspect others could benefit from what you find, please report
here (and maybe in the wiki).
--Maarten
On Saturday, September 22, 2012, Dano wrote:
> Thanks David. I am relieved that Lift comet actor support works with iOS6
> - that explains the lack of alarm. I had jumped to a conclusion. Next
> time I will check the demo site first.
>
> I will do some more digging based on your reply to see if I can pry our
> app loose on iOS6.
>
>
> Dan
>
> On Friday, September 21, 2012 3:57:35 PM UTC-7, David Pollak wrote:
>>
>> CometActors work fine on iOS 6. I just used http://demo.liftweb.net on
>> my iPad and iPhone (both iOS 6). The comet actors stuff works perfectly.
>>
>> If you're having a problem with connection starvation, please see
>> LiftRules.**maxConcurrentRequests. It will allow you to compute the
>> maximum requests for a single session.
>>
>> You can also use the comet from random hostname feature to make sure each
>> request comes to a different hostname which means you'll never have more
>> than 1 Comet long poll to a given host.
>>
>> On Fri, Sep 21, 2012 at 3:21 PM, Dano <oleary...@gmail.com> wrote:
>>
>>> Tyler,
>>>
>>> Thanks for your response.
>>>
>>> I am a little surprised there is no alarm with respect to comet actors
>>> being out of commission on iOS6, but maybe I am just not understanding the
>>> situation.
>>>
>>> Probably should have added some detail in the original post. Our site (
>>> playknowsy.com) uses comet actors to support interactive game play
>>> (just like our other site innovationgames.com which is referenced on
>>> liftweb.net as an example site). We tuned our site for the iPad form
>>> factor and touch interface. It also works great on desktop browsers too.
>>>
>>> Our site playknowsy.com is currently DOA on iOS6 with respect to game
>>> play (which is the main feature of the site). Any other site on the planet
>>> which uses long polling is also DOA on iOS6. It may be that Apple sees the
>>> error of their ways and fixes the problem (which I expect they will but it
>>> is really hard to wait and do nothing in the meantime).
>>>
>>> That said, I was hoping not to have to rewrite our site to use
>>> websockets as an emergency fix (much as I like the solution it provides).
>>> As to the caching content, are you implying I should I tweek the Lift
>>> sources to change the comet actor POST to set the Cache-Control in the
>>> header to "no-cache"?
>>>
>>> I am just trying to figure out a "plan B" should Apple fail to come thru.
>>>
>>> Thanks again for hearing me out.
>>>
>>>
>>> Dan
>>>
>>>
>>> On Friday, September 21, 2012 1:05:06 PM UTC-7, Tyler Weir wrote:
>>>>
>>>> It looks like Safari on iOS6[3] supports Websockets[1].
>>>>
>>>> Also, check out this comment regarding caching content[2].
>>>>
>>>> [1] - http://en.wikipedia.org/**wiki**/WebSocket<http://en.wikipedia.org/wiki/WebSocket>
>>>> [2] - http://stackoverflow.com/a/**1**2516555/456551<http://stackoverflow.com/a/12516555/456551>
>>>>
>>>> On Friday, September 21, 2012 2:28:45 PM UTC-4, Dano wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> As mentioned on hacker news (http://www.realsoftwareblog.**c**
>>>>> om/2012/09/ios-6-mobile-**safari**-web-applications.html<http://www.realsoftwareblog.com/2012/09/ios-6-mobile-safari-web-applications.html>),
>>>>> it looks like mobile safari is restricting the number of simultaneous open
>>>>> http connections to 1 (down from the standard 2 all other browsers support).
>>>>>
>>>>> The only guidance I have seen so far is from this post (
>>>>> http://stackoverflow.com/**ques**tions/12506897/is-ios6-**safari-**
>>>>> caching-ajax-results<http://stackoverflow.com/questions/12506897/is-ios6-safari-caching-ajax-results>)
>>>>> which recommends adding a variable to the post which keeps the browser from
>>>>> caching the result from the first long polling call and reissue the next
>>>>> one. I am not exactly sure what this translates to for Lift apps with
>>>>> comet actors.
>>>>>
>>>>> Have any Lifters seen this problem and/or figured out an easy way to
>>>>> deal with it?
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>>
>>>>> Dan
>>>>>
>>>> --
>>> --
>>> Lift, the simply functional web framework: http://liftweb.net
>>> Code: http://github.com/lift
>>> Discussion: http://groups.google.com/**group/liftweb<http://groups.google.com/group/liftweb>
>>> Stuck? Help us help you: https://www.assembla.com/wiki/**
>>> show/liftweb/Posting_example_**code<https://www.assembla.com/wiki/show/liftweb/Posting_example_code>
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Telegram, Simply Beautiful CMS https://telegr.am
>> Lift, the simply functional web framework http://liftweb.net
>> Follow me: http://twitter.com/dpp
>> Blog: http://goodstuff.im
>>
>>
>> --
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you:
> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
>
>
>
--e89a8f2357ab99e78204ca48f29c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
.... if you suspect others could benefit from what you find, please report =
here (and maybe in the wiki).<span></span><div><br></div><div>--Maarten<br>=
<br>On Saturday, September 22, 2012, Dano wrote:<br><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex">
Thanks David.=A0 I am relieved that Lift comet actor support works with iOS=
6 - that explains the lack of alarm.=A0 I had jumped to a conclusion.=A0=A0=
Next time I will check the demo site first.<br><br>I will do some more dig=
ging based on your reply to see if I can pry our app loose on iOS6.<br>
<br><br>Dan<br><br>On Friday, September 21, 2012 3:57:35 PM UTC-7, David Po=
llak wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:=
0.8ex;border-left:1px #ccc solid;padding-left:1ex">CometActors work fine on=
iOS 6. I just used <a href=3D"http://demo.liftweb.net" target=3D"_blank">h=
ttp://demo.liftweb.net</a> on my iPad and iPhone (both iOS 6). The comet ac=
tors stuff works perfectly.<div>
<br></div><div>If you're having a problem with connection starvation, p=
lease see LiftRules.<u></u>maxConcurrentRequests. It will allow you to comp=
ute the maximum requests for a single session.</div>
<div><br></div><div>You can also use the comet from random hostname feature=
to make sure each request comes to a different hostname which means you=
9;ll never have more than 1 Comet long poll to a given host.<br><br><div cl=
ass=3D"gmail_quote">
On Fri, Sep 21, 2012 at 3:21 PM, Dano <span dir=3D"ltr"><<a>oleary...@gm=
ail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Tyler,<br><br>Thanks for your response.<br><br>I am a little surprised ther=
e is no alarm with respect to comet actors being out of commission on iOS6,=
but maybe I am just not understanding the situation.<br><br>Probably shoul=
d have added some detail in the original post.=A0 Our site (<a href=3D"http=
://playknowsy.com" target=3D"_blank">playknowsy.com</a>) uses comet actors =
to support interactive game play (just like our other site <a href=3D"http:=
//innovationgames.com" target=3D"_blank">innovationgames.com</a> which is r=
eferenced on <a href=3D"http://liftweb.net" target=3D"_blank">liftweb.net</=
a> as an example site).=A0 We tuned our site for the iPad form factor and t=
ouch interface.=A0 It also works great on desktop browsers too.=A0=A0 <br>
<br>Our site <a href=3D"http://playknowsy.com" target=3D"_blank">playknowsy=
.com</a> is currently DOA on iOS6 with respect to game play (which is the m=
ain feature of the site).=A0 Any other site on the planet which uses long p=
olling is also DOA on iOS6.=A0 It may be that Apple sees the error of their=
ways and fixes the problem (which I expect they will but it is really hard=
to wait and do nothing in the meantime).<br>
<br>That said, I was hoping not to have to rewrite our site to use websocke=
ts as an emergency fix (much as I like the solution it provides).=A0 As to =
the caching content, are you implying I should I tweek the Lift sources to =
change the comet actor POST to set the Cache-Control in the header to "=
;no-cache"?<br>
<br>I am just trying to figure out a "plan B" should Apple fail t=
o come thru.<br><br>Thanks again for hearing me out.<br><br><br>Dan<div><di=
v><br><br>On Friday, September 21, 2012 1:05:06 PM UTC-7, Tyler Weir wrote:=
<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;borde=
r-left:1px #ccc solid;padding-left:1ex">
It looks like Safari on iOS6[3] supports Websockets[1].<div><br></div><div>=
Also, check out this comment regarding caching content[2].</div><div><br></=
div><div>[1] -=A0<a href=3D"http://en.wikipedia.org/wiki/WebSocket" target=
=3D"_blank">http://en.wikipedia.org/<u></u>wiki<u></u>/WebSocket</a></div>
<div>[2] -=A0<a href=3D"http://stackoverflow.com/a/12516555/456551" target=
=3D"_blank">http://stackoverflow.com/a/<u></u>1<u></u>2516555/456551</a><br=
><br>On Friday, September 21, 2012 2:28:45 PM UTC-4, Dano wrote:<blockquote=
class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px =
#ccc solid;padding-left:1ex">
Hello,<br><br>As mentioned on hacker news (<a href=3D"http://www.realsoftwa=
reblog.com/2012/09/ios-6-mobile-safari-web-applications.html" target=3D"_bl=
ank">http://www.realsoftwareblog.<u></u>c<u></u>om/2012/09/ios-6-mobile-<u>=
</u>safari<u></u>-web-applications.html</a>), it looks like mobile safari i=
s restricting the number of simultaneous open http connections to 1 (down f=
rom the standard 2 all other browsers support).<br>
<br>The only guidance I have seen so far is from this post (<a href=3D"http=
://stackoverflow.com/questions/12506897/is-ios6-safari-caching-ajax-results=
" target=3D"_blank">http://stackoverflow.com/<u></u>ques<u></u>tions/125068=
97/is-ios6-<u></u>safari-<u></u>caching-ajax-results</a>) which recommends =
adding a variable to the post which keeps the browser from caching the resu=
lt from the first long polling call and reissue the next one.=A0 I am not e=
xactly sure what this translates to for Lift apps with comet actors.<br>
<br>Have any Lifters seen this problem and/or figured out an easy way to de=
al with it?<br><br>Thanks in advance.<br><br><br>Dan<br></blockquote></div>=
</blockquote>
<p></p>
-- <br>
-- <br>
Lift, the simply functional web framework: <a href=3D"http://liftweb.net" t=
arget=3D"_blank">http://liftweb.net</a><br>
Code: <a href=3D"http://github.com/lift" target=3D"_blank">http://github.co=
m/lift</a><br>
Discussion: <a href=3D"http://groups.google.com/group/liftweb" target=3D"_b=
lank">http://groups.google.com/<u></u>group/liftweb</a><br>
Stuck? Help us help you: <a href=3D"https://www.assembla.com/wiki/show/lift=
web/Posting_example_code" target=3D"_blank">https://www.assembla.com/wiki/<=
u></u>show/liftweb/Posting_example_<u></u>code</a><br>
=A0<br>
=A0<br>
=A0<br>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>=
<div>Telegram, Simply Beautiful CMS <a href=3D"https://telegr.am" target=3D=
"_blank">https://telegr.am</a></div>Lift, the simply functional web framewo=
rk <a href=3D"http://liftweb.net" target=3D"_blank">http://liftweb.net</a><=
div>
Follow me: <a href=3D"http://twitter.com/dpp" target=3D"_blank">http://twit=
ter.com/dpp</a><br>Blog: <a href=3D"http://goodstuff.im" target=3D"_blank">=
http://goodstuff.im</a><br></div><div><br></div><br>
</div>
</blockquote>
<p></p>
-- <br>
-- <br>
Lift, the simply functional web framework: <a href=3D"http://liftweb.net" t=
arget=3D"_blank">http://liftweb.net</a><br>
Code: <a href=3D"http://github.com/lift" target=3D"_blank">http://github.co=
m/lift</a><br>
Discussion: <a href=3D"http://groups.google.com/group/liftweb" target=3D"_b=
lank">http://groups.google.com/group/liftweb</a><br>
Stuck? Help us help you: <a href=3D"https://www.assembla.com/wiki/show/lift=
web/Posting_example_code" target=3D"_blank">https://www.assembla.com/wiki/s=
how/liftweb/Posting_example_code</a><br>
=A0<br>
=A0<br>
=A0<br>
</blockquote></div>
--e89a8f2357ab99e78204ca48f29c--