How to block mobile or smartphone browser access for clock in/out functions in

We've created a clock in/clock out page built using in vb, and we are trying to see how to add controls to block it for users trying to access the page on mobile browsers or outside networks.

We know we can restrict it to a single IP address, however, the organization the IP belongs to frequently changes their network IP  (as we've been told).

Any code set would be of help.

Please let me know if you have any further questions.

Who is Participating?
Roopesh ReddyIT AnalystCommented:

Try this website -

Hope it helps u...
One option is to look at the user agent string. But it could be faked on droids.
A really simple trick would be to create a style sheet rule after all your other CSS data that hides the page for mobile devices.  Like this...

	<style type="text/css" media="screen">
	  normal CSS stuff here...
	<style type="text/css" media="handheld">
		body { display: none; }
		html { display: none; }
		input { display: none; }

Open in new window

I haven't actually tried this, and it MIGHT affect a few handheld devices such as tablets, but its no worse than checking for a user agent string, which as CodeCruiser rightly points out could be easily faked.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.