In order to creating a website that works well in all devices We have some ways:
Using CSS frameworks (like bootstrap)
Using media queries in CSS 3 (old devices / Browsers not supporting media queries)
Measurement the size of screen by JavaScript and link to Appropriate CSS file ( EX: If the size of user browser width is lower than 400px link to mobile.css This Answer)
Detecting the user browser by HTTP request and redirecting to suitable page ( EX : If PHP detected that user Agent is a mobile redirect to a mobile version of that page. Link)
My Questions:
1-Wich way is better for Great web sites?
2-Is there any other way to creating responsive website?
3-wich way Google, Facebook, Ebay, Amazon are using?
I think google, Facebook and Ebay are uisng your 4th way, and I think the 4th way is the best way becouse all user can see the best screen size and the best web page and it is so lite(Small)