Jump to content

Определить браузер


Recommended Posts

Есть потребность: отображать рисунки в соответствии с браузером.

Подскажите как определить какой браузер использует посетите

Link to comment
Share on other sites

Опера часто себя как "ИЕ" объявляет, поэтому у меня вот так:

var Netscape, MSIE, Opera;

Netscape = navigator.appName == "Netscape";

MSIE = navigator.appName == "Microsoft Internet Explorer";

Opera = navigator.userAgent.indexOf("Opera") > -1;

Link to comment
Share on other sites

В пхп есть так называемые "переменные окружения". Возвращает тип браузера, ip-адрес и ещё много чего интересного. С помощью условного оператора можно сделать, чтобы контент паги был динамичным и зависел от браузера.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...