htmlmobilepopupwindow

Pop-up message when site it accessed on mobile device


Is there a way to alert a user if he accesses my web page on his mobile device?

The reason for this is because this particular web page is not coded in a way to be looked at on a mobile device (at least not yet).

So, if any would access the web page on his mobile a pop-up will appear saying something like:

"This web page is currently not supported by mobile devices".

Would this be hard to do ?


Solution

  • Yes it is possible, you need mobile detection script, have a look at following project on github. I have used it myself for similar requirements. This solution is for PHP (you haven't mention which technologies you been using).

    https://github.com/serbanghita/Mobile-Detect