Please allow me to ask a silly question about Google's site(google.com). I have tested their site with computer browsers and smartphone browsers. Okay! Here is the question that i have, when the time i make the computer browser to a small screen, the layout of Google's site does not fit in a mobile friendly layout. But, it does become mobile friendly layout when it's on mobile screen. But, the url is still same http://www.google.com.
I have tried other site, but other site is using 301 redirect when mobile screen detected and their url will be transferring to mobile url. I am curios about this how can google do this(change the mobile friendly web layout on mobile screen but keep same url). I keep thinking about this question until i can't sleep well. Is there anyone here know what is the trick google use?
This is using Media queries:
Check This link for more details
is just css style when the website on mobile, for example you want a div not shown on mobile device you can do this:
Check this example