[Seaside] Detecting mobile devices

Philippe Marschall philippe.marschall at gmail.com
Thu Sep 29 14:12:45 UTC 2011


2011/9/29  <bobn at rogers.com>:
> I used the following code for a demo (VW 7.7.1 + Seaside 3.0).
> The redirection was from a root dispatcher application to separate Seaside
> applications in the same image.
> | string |
> string := self requestContext request userAgent.
> (string includesSubString: 'iPad') ifTrue: [^self requestContext redirectTo:
> self tabletURL].
> (string includesSubString: 'iPhone') ifTrue: [^self requestContext
> redirectTo: self phoneURL].
> (string includesSubString: 'webOS') ifTrue: [^self requestContext
> redirectTo: self tabletURL].
> ^self requestContext redirectTo: self portalURL

No, please not like this.

Cheers
Philippe


More information about the seaside mailing list