FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » The prefered way to handle mobile apps?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: The prefered way to handle mobile apps? [message #174987 is a reply to message #174985] Fri, 29 July 2011 13:46 Go to previous messageGo to previous message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma:
Senior Member
On Fri, 29 Jul 2011 08:33:59 +0200, Simon wrote:
> 2) The time spent at every page load to look if this is a mobile or not.
>
> In the end, I might settle for $_SERVER['HTTP_X_WAP_PROFILE'] and/or
> $_SERVER['HTTP_ACCEPT'] (wap)

Well, you could set a cookie or a session var for what brower type to
expect, but that'd probably take LONGER than just handling the user
agent parsing. After a few page loads, all the data necessary to handle
the agent examination is probably cached (or could be cached at least),
and not really going to be looking a a whole lot of time to make the
determination anymore. Lots of work has already been done to make sure
that repeated operations take as little effort as possible, so you might
as well take advantage of that over writing more code to save very
little time.

--
32. I will not fly into a rage and kill a messenger who brings me bad
news just to illustrate how evil I really am. Good messengers are
hard to come by.
--Peter Anspach's list of things to do as an Evil Overlord
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: *WHAT IS ISLAM ?*
Next Topic: Sort an array by value type. Where do I start :)??
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 04:57:31 GMT 2024

Total time taken to generate the page: 0.03983 seconds