Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > code to check browser verison and alter url accordingly

Reply
Thread Tools

code to check browser verison and alter url accordingly

 
 
paul
Guest
Posts: n/a
 
      12-12-2004
Beauregard T. Shagnasty wrote:
> Jan Faerber wrote:
>
>> So the palm automatically redirects to www.google.com/palm - ?

>
>
> Perhaps. I don't have one. Google probably has ample coders to maintain
> multiple versions of their sites, but this isn't something the average
> small shop should need to be involved in.



I believe google uses php. They probably process the same data into
multiple formats so don't really maintain multiple copies.
 
Reply With Quote
 
 
 
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      12-12-2004
paul wrote:

> I believe google uses php. They probably process the same data into
> multiple formats so don't really maintain multiple copies.


I suppose that is possible; I use php, too. But due to the speed at
which it operates, I'd guess it is something more robust, perhaps even
compiled modules. No way to tell from here.

Their main page has:

<form action=/search name=f>

--
-bts
-This space intentionally left blank.
 
Reply With Quote
 
 
 
 
Toby Inkster
Guest
Posts: n/a
 
      12-12-2004
paul wrote:

> I believe google uses php.


I would be highly skeptical of such a claim.

(IIRC Yahoo does though.)

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
TheDragon
Guest
Posts: n/a
 
      12-12-2004
You ever tried viewing a web page on a mobile phone, very difficult.

What I am trying to achieve is a mini version of my site just for mobiles.
There thay can download games ringtones etc.
They could view a mini copy of the main site, but will much smaller
graphics, and less of them.



 
Reply With Quote
 
TheDragon
Guest
Posts: n/a
 
      12-12-2004
Thanks for the links. I tried to google, but got nowhere. I suppose i may be
asking the wrong qustions, and getting naff results.

The top link shows someone else asking the exack same question. So i know i
am now not alone.


 
Reply With Quote
 
Kris
Guest
Posts: n/a
 
      12-12-2004
In article <>,
"TheDragon" <> wrote:

> You ever tried viewing a web page on a mobile phone, very difficult.


Please quote what you are replying to, it is the common practice in this
group.

Viewing a website on a mobile phone is not necessarily difficult. It is
however *different*. Most of the sites I make have little difficulty
being used on a mobile phone. These websites are built for the web, not
for particular browsers.

> What I am trying to achieve is a mini version of my site just for mobiles.


If you can use 5 words instead of 10 to convey the same message, why
would people with desktop browsers need to deal with 10 words?

> There thay can download games ringtones etc.


I usually download them using my desktop browser. Bluetooth can be a
wonderful thing.

> They could view a mini copy of the main site, but will much smaller
> graphics, and less of them.


They can disable graphics themselves to keep bandwidth fees low. You
could supply a stylesheet for the handheld media type which replaces
images for their alt attribute value, for browsers that support this.

--
Kris
<> (nl)
 
Reply With Quote
 
Philip Ronan
Guest
Posts: n/a
 
      12-12-2004
TheDragon wrote:

> You ever tried viewing a web page on a mobile phone, very difficult.
>
> What I am trying to achieve is a mini version of my site just for mobiles.
> There thay can download games ringtones etc.
> They could view a mini copy of the main site, but will much smaller
> graphics, and less of them.


Search Google for "content negotiation".

Basically what you need to do is check the "Accept" header in the HTTP
request provided by the user agent. if it claims to prefer
"text/vnd.wap.wml" over "text/html" then serve up the .wml content. Apache
servers can do this automatically for you. YMMV on other systems.

Checking for specific HTML user agents (e.g. Palm) isn't going to be quite
as straightforward, and to be honest you might be better off producing a
flexible design that works at all sizes, as others have suggested.
Alternatively you could apply string matching to the "User-Agent" request
header (which is probably what Google are doing). But bear in mind your algo
will have to be updated regularly as new handheld HTML browsers come out.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/


 
Reply With Quote
 
paul
Guest
Posts: n/a
 
      12-12-2004
Toby Inkster wrote:
> paul wrote:
>
>
>>I believe google uses php.

>
>
> I would be highly skeptical of such a claim.
>
> (IIRC Yahoo does though.)



That's what my php instructor said (an old hippy at a big city community
college). Surely they have a very powerful database server connected to
whatever they are using.
 
Reply With Quote
 
TheDragon
Guest
Posts: n/a
 
      12-12-2004

"Philip Ronan" <> wrote in message
news:BDE1F41F.26B78%...
> TheDragon wrote:
>
>> You ever tried viewing a web page on a mobile phone, very difficult.
>>
>> What I am trying to achieve is a mini version of my site just for
>> mobiles.
>> There thay can download games ringtones etc.
>> They could view a mini copy of the main site, but will much smaller
>> graphics, and less of them.

>
> Search Google for "content negotiation".
>
> Basically what you need to do is check the "Accept" header in the HTTP
> request provided by the user agent. if it claims to prefer
> "text/vnd.wap.wml" over "text/html" then serve up the .wml content. Apache
> servers can do this automatically for you. YMMV on other systems.
>
> Checking for specific HTML user agents (e.g. Palm) isn't going to be quite
> as straightforward, and to be honest you might be better off producing a
> flexible design that works at all sizes, as others have suggested.
> Alternatively you could apply string matching to the "User-Agent" request
> header (which is probably what Google are doing). But bear in mind your
> algo
> will have to be updated regularly as new handheld HTML browsers come out.
>
> --
> phil [dot] ronan @ virgin [dot] net
> http://vzone.virgin.net/phil.ronan/
>
>


Thanks for this tip I will have a play. I am using IIS5 not Apache, but will
give it a try.

Thanks again.


 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      12-12-2004
paul wrote:

> That's what my php instructor said (an old hippy at a big city community
> college).


Then he is silly. If Google do use PHP it would only be for peripheral
things. To implement the main Google search functionality in PHP would be
entirely too inefficient.

> Surely they have a very powerful database server connected to whatever
> they are using.


No. They have a pool of tens-of-thousands of low-powered run-of-the-mill
Intel boxen.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to append a file accordingly? Why Tea Perl Misc 10 11-27-2007 11:14 AM
In a GridView how do you search for an item and set the GridView1.PageIndex accordingly? S_K ASP .Net 1 10-18-2007 06:06 PM
Alter the HTML output before it's sent to the web browser, possible? Brian Simmons ASP .Net 2 07-19-2007 08:43 PM
Alter - Perl extension for Alter Ego Objects anno4000@radom.zrz.tu-berlin.de Perl Misc 0 06-30-2007 04:13 PM
Trial to Full Verison =?Utf-8?B?dmlkZW9tYW4=?= Windows 64bit 6 07-06-2005 11:56 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57