Search code examples
javascriptphpcssresponsive-designmedia-queries

Creating Responsive Website with different ways


In order to creating a website that works well in all devices We have some ways:

  1. Using CSS frameworks (like bootstrap)

  2. Using media queries in CSS 3 (old devices / Browsers not supporting media queries)

  3. 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)

  4. 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?


Solution

  • 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)