Hi, I was wondering if anyone could tell me how exactly a website knows if you are visiting from your computer (ie/firefox) or from your cell phone browser??? For example, if I go to http://mobile.google.com in firefox, it is a different webpage than if I use my mobile browser. I just need to know how it works, or how I can access the mobile version of a webpage on my PC? Any info will help!
you can program that all in CSS. I dont think you will be able to access the mobile version from a computer.
Of cause you can, people building sites for mobiles dont have to get their mobile out each time they want to check how it looks. http://support.microsoft.com/kb/320977 Above has links for windows internet explorer mobile to view on your PC - you can certainly also get emulators for WAP and other mobile options. As to how they do it? There are a number of options, .Net has built in mobile components that will identify the users system capabilities and modify the page appropriately for them.
On every request browsers send a parameter called User Agent. Therefore a server / script can recognise the browser you are using (e.g. a mobile phone is not likely to send "Firefox" as its User Agent) and is able to deliver adjusted content. If only the design is to be changed, this can be set while linking a website to its stylesheets. Short example for using different stylesheets according to the purpose of display: <link rel="stylesheet" media="screen,projection,tv" href="main.css" type="text/css"> <link rel="stylesheet" media="print" href="print.css" type="text/css"> <link rel="stylesheet" media="handheld" href="smallscreen.css" type="text/css"> HTML: Or, for a full description: http://www.howtocreate.co.uk/tutorials/css/mediatypes