Home > Life, Tech Snippets, Tech Trends > Safari User Agent iphone and more

Safari User Agent iphone and more

Safari has one feature will allow you to make the browser behave like any other user-agents(IE, FF, Opera etc). This is done be changing the User Agent in the develop menu.
Develop -> User Agent, if you dont find this DEVELOP menu item in the menu bar, click on Edit->Preferences and add this.

Once i faced a cross browser issue in IE, for one of our applications, i did a fix and it worked well in IE, but when i changed the user agent in Safari to IE, the fix failed. Then rose a situation, where it became essential for me to handle this separately(Safari with USER agent as IE). I noticed a peculiar rather interesting thing, in dojo, there is a statement dojo.render.html.mozilla or dojo.render.html.safari will return a boolean in normal scenario whereas in Safari-User Agent, it will return a array of objects, so with that we conditionally detected the actual browser and made the fix.

This was one bugging thing about the Safari -User Agent, but there is a interesting thing about this, which will fetch you free stuff, read your favorite magazines online. You want to know how? check this here.

Thanks Subbu for sharing this in Reader.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 62 other followers

%d bloggers like this: