Glad you like the feature! I don't think dimensions are available in the 
user-agent string that the browser passes to the server. So your only 
option is to use jQuery or CSS media queries.

On Sunday, February 26, 2012 11:13:42 PM UTC-5, weheh wrote:
>
> And, I might add, this is simply awesome. It would also be very cool 
> if it could give me the dimensions of the browser window. I know I can 
> get it via jQuery, but it would save a step. 
>
> On Feb 22, 10:15 pm, Massimo Di Pierro <[email protected]> 
> wrote: 
> > I think this was fixed in a later version. 
> > 
> > On Feb 21, 9:52 pm, weheh <[email protected]> wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > I'm trying to detect the browser being used to access my web2py app. 
> > > The literature seems to recommend reading request.env.http_user_agent. 
> > > But the results are a little confusing, so I'm trying 
> > > request.user_agent(), which uses "gluon/contrib/ 
> > > user_agent_parser.py" (as per the doc). This throws the following 
> > > ticket: 
> > 
> > > Traceback (most recent call last): 
> > >   File "N:\web2py\gluon\main.py", line 518, in wsgibase 
> > >     session._try_store_on_disk(request, response) 
> > >   File "N:\web2py\gluon\globals.py", line 528, in _try_store_on_disk 
> > >     cPickle.dump(dict(self), response.session_file) 
> > > PicklingError: Can't pickle <class 'storage.Storage'>: it's not the 
> > > same object as storage.Storage 
> > 
> > > I'm on web2py v1.99.2 
> > 
> > > Thanks.


On Sunday, February 26, 2012 11:13:42 PM UTC-5, weheh wrote:
>
> And, I might add, this is simply awesome. It would also be very cool 
> if it could give me the dimensions of the browser window. I know I can 
> get it via jQuery, but it would save a step. 
>
> On Feb 22, 10:15 pm, Massimo Di Pierro <[email protected]> 
> wrote: 
> > I think this was fixed in a later version. 
> > 
> > On Feb 21, 9:52 pm, weheh <[email protected]> wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > I'm trying to detect the browser being used to access my web2py app. 
> > > The literature seems to recommend reading request.env.http_user_agent. 
> > > But the results are a little confusing, so I'm trying 
> > > request.user_agent(), which uses "gluon/contrib/ 
> > > user_agent_parser.py" (as per the doc). This throws the following 
> > > ticket: 
> > 
> > > Traceback (most recent call last): 
> > >   File "N:\web2py\gluon\main.py", line 518, in wsgibase 
> > >     session._try_store_on_disk(request, response) 
> > >   File "N:\web2py\gluon\globals.py", line 528, in _try_store_on_disk 
> > >     cPickle.dump(dict(self), response.session_file) 
> > > PicklingError: Can't pickle <class 'storage.Storage'>: it's not the 
> > > same object as storage.Storage 
> > 
> > > I'm on web2py v1.99.2 
> > 
> > > Thanks.

Reply via email to