[google-appengine] Re: Can Appengine provide Browser information..?

2009-03-30 Thread John Boxall

Hey Tom, you might find this article helpful:
http://smartmobtoolkit.wordpress.com/2009/01/25/not-device-detection-example-code/

I've developed an example page with this page in Python hosted on GAE
here:
http://notnotmobile.appspot.com

Cheers,

John

On Mar 26, 10:59 am, "Tom M."  wrote:
> Very helpful.
>
> Are there any suggested "best practices" for determining how to
> display a page? For example, in displaying a wine bottle I'd like to
> have a mobile friendly page and a full page for online visitors. Do I
> just switch off of the HTTP_USER_AGENT?
>
> Guidance much appreciated!
>
> On Mar 16, 9:05 am, Joe Bowman  wrote:
>
> > import os
>
> > os.environ['REMOTE_ADDR'] is the IP
> > os.environ['HTTP_USER_AGENT'] is the user agent
>
> > I'm sure there's more, those are the two I needed when I created the
> > sessions utility.
>
> > Note: I've found that they don't always populate, more than likely a
> > perbrowserissue. I was confused to see REMOTE_ADDR not always
> > populate.
>
> > On Mar 15, 12:06 pm, xml2jsonp  wrote:
>
> > > Using JavaScript:
>
> > > if (/msie/.test(navigator.userAgent.toLowerCase())
> > > && !/opera/.test(navigator.userAgent.toLowerCase())) {
> > > [...]
>
> > > On Mar 15, 7:56 am, jago  wrote:
>
> > > > Hi,
>
> > > > Can I write some Python code that creates an HTML which prints if the
> > > > client is running Firefox or IE ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can Appengine provide Browser information..?

2009-03-26 Thread Tom M.

Very helpful.

Are there any suggested "best practices" for determining how to
display a page? For example, in displaying a wine bottle I'd like to
have a mobile friendly page and a full page for online visitors. Do I
just switch off of the HTTP_USER_AGENT?

Guidance much appreciated!


On Mar 16, 9:05 am, Joe Bowman  wrote:
> import os
>
> os.environ['REMOTE_ADDR'] is the IP
> os.environ['HTTP_USER_AGENT'] is the user agent
>
> I'm sure there's more, those are the two I needed when I created the
> sessions utility.
>
> Note: I've found that they don't always populate, more than likely a
> perbrowserissue. I was confused to see REMOTE_ADDR not always
> populate.
>
> On Mar 15, 12:06 pm, xml2jsonp  wrote:
>
> > Using JavaScript:
>
> > if (/msie/.test(navigator.userAgent.toLowerCase())
> > && !/opera/.test(navigator.userAgent.toLowerCase())) {
> > [...]
>
> > On Mar 15, 7:56 am, jago  wrote:
>
> > > Hi,
>
> > > Can I write some Python code that creates an HTML which prints if the
> > > client is running Firefox or IE ?
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can Appengine provide Browser information..?

2009-03-16 Thread Joe Bowman

import os

os.environ['REMOTE_ADDR'] is the IP
os.environ['HTTP_USER_AGENT'] is the user agent

I'm sure there's more, those are the two I needed when I created the
sessions utility.

Note: I've found that they don't always populate, more than likely a
per browser issue. I was confused to see REMOTE_ADDR not always
populate.

On Mar 15, 12:06 pm, xml2jsonp  wrote:
> Using JavaScript:
>
> if (/msie/.test(navigator.userAgent.toLowerCase())
> && !/opera/.test(navigator.userAgent.toLowerCase())) {
> [...]
>
> On Mar 15, 7:56 am, jago  wrote:
>
> > Hi,
>
> > Can I write some Python code that creates an HTML which prints if the
> > client is running Firefox or IE ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can Appengine provide Browser information..?

2009-03-15 Thread xml2jsonp

Using JavaScript:

if (/msie/.test(navigator.userAgent.toLowerCase())
&& !/opera/.test(navigator.userAgent.toLowerCase())) {
[...]

On Mar 15, 7:56 am, jago  wrote:
> Hi,
>
> Can I write some Python code that creates an HTML which prints if the
> client is running Firefox or IE ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can Appengine provide Browser information..?

2009-03-15 Thread Steve Robillard

 
Try a Google search for browser detection or sniffing. Basically you need to
check the request headers, but this is very difficult to get right 100% of
the time for all browsers.


-Original Message-
From: google-appengine@googlegroups.com
[mailto:google-appeng...@googlegroups.com] On Behalf Of jago
Sent: Sunday, March 15, 2009 2:57 AM
To: Google App Engine
Subject: [google-appengine] Can Appengine provide Browser information..?


Hi,

Can I write some Python code that creates an HTML which prints if the client
is running Firefox or IE ?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---