LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Feedback/Feature Requests > Is it possible litespeed has a problem with mobile safari ?

Reply
 
Thread Tools Display Modes
  #1  
Old 02-10-2011, 02:50 PM
aww aww is offline
Senior Member
 
Join Date: May 2007
Posts: 237
Question Is it possible litespeed has a problem with mobile safari ?

I could be wrong but I am seeing strange, much longer page load times on mobile Safari from an iphone when connecting to litespeed 4.0.x

There are some subtle differences in Safari on iphone. Perhaps there is a timeout issue.

Does anyone have an easy way to test the same content from apache vs litespeed off their iphone?

I don't want to start "pointing fingers" until I have more data.

I know Chrome on Android is not experiencing any problems and it's also webkit based but there are definitely core differences between the two browsers.
Reply With Quote
  #2  
Old 02-10-2011, 03:05 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
You can try "tcpdump" on server side.
First, find out the IP of your iPhone.
Then run command

tcpdump -s0 -X host <ip_of_your_iphone>

think it is just the poor AT&T wireless network.
Reply With Quote
  #3  
Old 02-10-2011, 03:56 PM
aww aww is offline
Senior Member
 
Join Date: May 2007
Posts: 237
If you don't mind I am going to PM you with some charts.
Reply With Quote
  #4  
Old 02-10-2011, 05:21 PM
aww aww is offline
Senior Member
 
Join Date: May 2007
Posts: 237
I turned off "smart keep alive" just to see if it makes any difference.

I am seeing roughly a 50% speed improvement, but it make be a fluke of course.

I will repeat the test late night on a weekend to see if super low traffic on their networks makes a difference.
Reply With Quote
  #5  
Old 02-10-2011, 11:24 PM
aww aww is offline
Senior Member
 
Join Date: May 2007
Posts: 237
I think I found the problem, maybe, mobile Safari is being picky.

LiteSpeed sends a Connection: Keep-Alive when the source is php output and does not allow php to override?

However the last thing I send on the page is a tracking gif, which I send as embedded packed hex, with header('Content-Type: image/gif') Content-Length: 43 and most importantly header('Connection: close')

The Connection: close is being removed/overwritten by litespeed with keep-alive, so safari keeps waiting for up to 5 seconds before it times out (or litespeed does).

How can I force litespeed to close the connection from php when I want it to?

(note that other browsers do not seem to have this problem so I am not blaming litespeed)

Code:
HTTP/1.1 200 OK
Date: Fri, 11 Feb 2011 07:26:57 GMT
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
Content-Type: image/gif
Content-Length: 43

Last edited by aww; 02-10-2011 at 11:30 PM..
Reply With Quote
  #6  
Old 02-11-2011, 09:10 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
you can turn off keepalive with rewrite rule, like

RewriteCond %{HTTP_USER_AGENT} iphone_user_agent_signature
RewriteRule . - [E=nokeepalive:1]
Reply With Quote
  #7  
Old 02-11-2011, 11:33 AM
aww aww is offline
Senior Member
 
Join Date: May 2007
Posts: 237
Oh excellent!

That is exactly the solution I was hoping for, based on useragent.

I wasn't aware litespeed could toggle things like keep-alive through htaccess

I will have to look for the docs.

OH! I see it's actually from apache. I never knew that directive!

But it's also over here http://store.litespeedtech.com/store...yarticle&id=21

Last edited by aww; 02-11-2011 at 12:31 PM..
Reply With Quote
  #8  
Old 02-11-2011, 12:19 PM
aww aww is offline
Senior Member
 
Join Date: May 2007
Posts: 237
Sadly this does not seem to be working.

Keep-Alive is still being sent

Even took out the condition and just tried by itself

RewriteRule . - [E=nokeepalive:1]

maybe it has to do with sending a different kind of Content-Type header from PHP which is making litespeed ignore it?

I'll try it on a plain PHP page.
Reply With Quote
  #9  
Old 02-11-2011, 12:41 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Are you sure rewrite is properly enabled? maybe enable rewrite log.
Reply With Quote
  #10  
Old 02-11-2011, 12:42 PM
aww aww is offline
Senior Member
 
Join Date: May 2007
Posts: 237
A little later I am going to create a minimal testing environment to see what exactly is happening.

By the way, I don't suppose PUTENV can be used within PHP to send the same command?

http://php.net/manual/en/function.putenv.php

ie. putenv("nokeepalive:1") or maybe putenv("nokeepalive=1")

not sure even apache will obey that.

Last edited by aww; 02-11-2011 at 12:45 PM..
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:54 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.