How to recognize Mobile Browser with Javascript for Android, iPhone, Symbian, Windows Mobile and Blackberry

With the deployment of advanced mobile phones (Android, iPhone, Symbian, Windows Mobile and Blackberry) we are experiencing the strongest growth of navigation via mobile browser. The most important sites are already taken care of and allocation to courses introducing their versions for browsers light taken from mobile phones. And you?

In this article we present a piece of JavaScript code that can come in handy if you intend to modify the site to make it compatible with mobile browsers.

Javascript function: How to recognize mobile browser

<script type="text/javascript"> / / <! [CDATA [ 
   var = Mobile 
   (Mobile) { 
       document.location = " http://www.yoursite.com/mobile.html ";
   }  / / ]]></ script>

How does it work?

The browser version is read from the property navigator.userAgent with Javascript that returns a string object with which you can find the name and version of any web browser

A sample output navigator.userAgent:
Mozilla/5.0 (Linux; U; Android 2.1-Update1; en-us;
ADR6300 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17 Mobile

How to save it if discharged battery after installing iPhone iOS 5

After installing the new operating system iOS 5 for iPhone users have noticed reduced battery operation. In the Apple tech support hundreds of people complaining That they have the iPhone discharged within 7-8 hours after full charge, but before they had worked several times longer.
The owners of iPhone, experiencing similar problems, note that using the device in such conditions may only always being close to the power supply. If you have exhausted quickly on iPhone iOS 5, try the following steps to fix the bug.

Addressing the rapid discharge of the iPhone on iOS 5:

  • Sbroste network settings : Settings -> General -> Reset -> Reset Network Settings;
  • Turn off Bluetooth : Preferences -> General -> Bluetooth -> Off;
  • Turn off unused notice : Settings -> Notifications;
  • Turn off the geolocation service : Settings -> Services geolocation -> Turn off unnecessary services;
  • Shut down the set time zone : Settings -> Services geolocation -> Setting the time zone;
  • Disable Ping : Settings -> General -> Restrictions -> Enable Restrictions -> Disable Ping;
  • Disable anonymous sending of diagnostic data : Settings -> General -> About your device -> Diagnostics and use -> Do not send. 
Another method, which eliminates the fast relaxation of the iPhone on iOS 5:

Disable Accounts Email : Settings -> Mail, addresses, calendars -> Accounts -> Delete Account. Then you need to reset the network settings (see paragraph 1), reboot your iPhone and add the account under Settings -> Mail, addresses, calendars -> Add.
 

Popular Posts

Most Reading

Tags

Android (474) Business (1) Food (1) Science (18) technology (132)

Nice Technology