/    Sign up×
Community /Pin to ProfileBookmark

browser check question

Yo guys,

i have a question.

I want to make a check on my website with which browser they are visiting my site….

why i need this because they have to auto forward them to the mobile site if they are using a mobile phone and if they are using normal browser they will be forwarded to the normal site.

i make a part of the site for mobile phones.

how do you call this and where can i find a script like this?

thnx

greetz

Codec

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@havikApr 03.2003 — var name = navigator.appName

if (name == "Insert name of mobile phone")

url=("phone.html");

else

url=("browser.html")

document.write('<A HREF="' + url + '">Enter</A>');

Example:

name == "Microsoft Internet Explorer"; to check for IE

name == "Netscape"; to check for NS

Havik
Copy linkTweet thisAlerts:
@CodecauthorApr 03.2003 — Great!!!

needed that, many thnx
×

Success!

Help @Codec spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...