Hotspot page for mobile phone!

Hello guys, i was working on mobile hotspot page for this week. I just finished that today and tested many many times. It’s working fine. I found 2 solutions to recognize mobile phone from hotspot page.
First : We can recognize by screen width. Screen width of most mobile phone is smaller than 600 or 500px(actually 480px). We can insert some javascript row in our login.html file.

function detectDevice()
{
if(screen.width<600)
document.location=“mobileLogin.html”;
else
document.location=“otherLogin.html”;
}

Second : We can know who connecting by mobile or other devices by user agent contained in http request. Example:
function detectDevice()
{
var mobile=(/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));
if(mobile)
document.location=“mobileLogin.html”;
else
document.location=“otherLogin.html”;
}

cool idea. keep up the good work.

Dear Ulzii,

i am trying to achieve the same thing but i cant it doesn’t seems to switch to the mobile version,i used the first alternative.

Sorry can you share the login.html codes for the hotspot?

I can’t share that. But I can help you for some suggestion on javascript.

I setup hotspot and userman but I am facing that the majority of mobiles can not access the page, while they get IP and they are connected?

my hotspot page is gif picture so can any one suggest the reason ?

Thank you