D
D
Denis Bukreev2016-09-30 14:11:39
JavaScript
Denis Bukreev, 2016-09-30 14:11:39

How to correctly determine the type of device and slip the desktop/mobile version?

Got this question.
PHP is not enabled.
Those. either JS or htaccess - which is better and how to implement correctly?
The desktop version consists of several pages, while the mobile one is a single page

Answer the question

In order to leave comments, you need to log in

2 answer(s)
_
_ _, 2016-09-30
@denisbookreev

Here is a link to Google
https://developers.google.com/webmasters/mobile-si...
In short - make a subdomain from which you give the mobile version (links between the main domain and the mobile one must be the same).
By User-Agent, you determine the mobile browser ( stackoverflow.com/questions/11702453/how-does-chro...
Depending on which domain the request came to and which browser you either give content to or send to the desired domain.
Well, write the metadata.

S
Seva, 2016-09-30
@Zewkin

According to the mind, the version should be one, adaptively laid out. But if you want to fence crutches, then the choice is rich - both by user agent, and by permission, and whatever you like.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question