Joomla: Getting Browser Type and Version Using JBrowser

Joomla provides the JBrowser class that provides convenience methods to extract client browser details from the user agent string.

You first create instance of the Jbrowser object. Pass in the user agent string for JBrowser to parse.


jimport('joomla.environment.browser');
$browser = &JBrowser::getInstance($_SERVER['HTTP_USER_AGENT']);

This will retrieve the name of the browser. Some of the browser types it returns: konqueror (safari), opera, mozilla, msie, palm, blackberry, nokia, iphone etc..


$browserName = $browser->getBrowser();

This will retrieve the version number of browser


$browserVersion = $browser->getMajor();

Some other things you can do with JBrowser


//Returns name of client's operating system
$os = $browser->getPlatform(); 
//Returns the decimal portion of the version number
$minor = $browser->getMinor();
//checks if browser has certain capability. Returns boolean.
$hasJs = $browser->hasFeature('javascript');

Leave a comment

36 Comments.

    • hello alex you are greate tknahs man buta ia have a problem i do all the step by step thinks in part 1 video of yours and all is greate so far . now when i start to put my domaine name as you are saying in the start of your video part 2.. there is no Joomla page just the frond picture that i put 10 days ago.. nothing alse what can i do to go forword man?PLASE HELP!!!!!

    • Heard of 10cc but could not tell you a song they recorded, (unless I cheat and look it up) a hit they had and deifliteny not who the players were.Heck back in the late 70 s and 80 s if it wasn’t , then I didn’t care about it

  1. Hm, I am comfortable with this however not completely positive, so i’m gonna research a touch more.

    • Thank you so much, Alex! This video is amazing! I’ve been trniyg to make Joomla work for a week now, watched so many other videos and none of them worked and before I gave up, just by chance came across your video! Thank you!

    • Because everyone that sends an email sends all of the iftmroanion I need to properly judge who should handle it?Forms allow me to ask questions to guide the person. Why do you want to contact us? We’ve got multiple products, how can I be sure you’re going to mention that? Preferred method of contact if we can’t do it via email? Preferred time for correspondence?If I could guarantee that an email was going to contain as much iftmroanion as I need to figure out how to respond, I would drop contact forms. Until then, absolutely not.The days of getting an email with no subject because they clicked on the mailto link and started typing, and didn’t include their contact iftmroanion, what they are interested in or even a small detailed description of their inquiry are over now that we can make a very simple contact form with checkboxes and radio buttons that make it very easy to filter the request and to have required fields that make sure the iftmroanion I need to make a decision is present.Using an obfuscated email just makes it harder for someone since they usually can’t just click the link and send the email. Granted some ways of presenting the email allow it to properly be clicked and sent, having someone need to cut and paste and remove the or the . or whatever other way you’ve tried to disguise your email just makes it harder for the person to contact you.Unless that’s your goal.

    • This is the proper Samsung Sells Over 30 Million Units of Galaxy S III…. – Let's Cocktail diary for anyone who wants to assay out out about this message. You react so often its virtually wearing to represent with you (not that I truly would want…HaHa). You definitely put a new rotate on a substance thats been scripted some for age. Good object, but zealous!

    • Hi, the package to isnlatl is jsn_epic_pro_standard_j2.5_4.ad4.1_install.zip. No need to unzip this file, just choose the whole zip file to upload and isnlatl. The file with name jsn_imageshow_theme_slider_doadcs.zip will help you to understand more about how to use the theme Slider in the JSN ImageShow (you will use this theme to present your photos). This file need to unzip to read. I got your submitted ticket. We’ll find out the solution to this issue and give you the best answer.

  2. Apart from India where it has great tradition, Yoga is being considered
    right an option in the USA and most part of Europe. While Bikram was
    on his research at Tokyo University, he discovered that the healing process takes place when all
    the body systems are functioning well, conditioned and strengthened.
    Yoga is especially beneficial for conception if done together with your partner
    to promote a peaceful and deep relationship.

  3. News plays an important role as a source of information. Forex trading and the
    market as a whole is greatly influenced by US dollar.
    It is really needed for all the people to be updated with every types of latest news.

  4. There are more than 4000 exercise images
    that provide you with a whole new Yoga experience. Because the most frequent
    changes associated with stress include increased heart rate,
    a change in breathing patterns and tension, yoga is ideal to treat this as it focuses on all three of these areas no matter what exercise or type of yoga you are doing.
    My Name is Didik Suprianto, i was born in Indonesia.

  5. For one thing, it is a time to share your views and feelings.
    When creating the chart, the number of the father is always two-times that the number given to
    the child. Would you like your family to spend more
    time together as a family.

  6. An intriguing discussion is definitely worth comment.
    There’s no doubt that that you ought to publish more on this issue, it might not be a taboo subject
    but generally people do not talk about these issues.
    To the next! Best wishes!!

  7. hi!,I really like your writing so a lot!
    proportion we keep in touch more approximately your article on AOL?
    I need a specialist on this area to solve my problem. May be
    that’s you! Looking ahead to see you.

  8. What’s up everyone, it’s my first go to see
    at this web site, and post is truly fruitful designed for me, keep up
    posting these types of articles.

  9. Thanks for sharing your thoughts about legal.
    Regards

  10. Because the admin of this website is working, no hesitation very
    rapidly it will be well-known, due to its feature contents.

  11. I do not know whether it’s just me or if perhaps everybody
    else encountering problems with your site. It looks like some of the text on your content are running off the screen. Can somebody
    else please comment and let me know if this is happening to
    them too? This could be a issue with my browser because I’ve had this happen previously.
    Cheers

  12. My partner and I absolutely love your blog and find almost all of your post’s to be
    what precisely I’m looking for. can you offer guest
    writers to write content available for you? I wouldn’t mind publishing a post or elaborating on many of the
    subjects you write concerning here. Again, awesome web log!

  13. To clean the metal blade or metal disks, it is best to wash them carefully by hand.
    I got this gift from him on our wedding anniversary which was round the corner of
    the week. Peel the pepper, cut off the top and remove the seeds and membrane.

  14. What’s up colleagues, fastidious article and pleasant urging commented here, I am truly enjoying by these.

  15. Do you imagine inn home based schooling for the children. The secret is getting individuals arrived at internet site.

    Life – Vantage Multilevel marketing repayment program.

  16. Hi girls, we did have our first task on Tuesday was using a new baby assortment termed by Carla that will market quilts etc,
    we’d wonderful enjoyment, the photographer was wonderful and some wonderful photographs d I keep examining the internet site ready to allow them
    to carry on even tho it’s approach to quickly lol!!

  17. Pretty! This has been an extremely wonderful post. Many thanks for supplying these details.

  18. I am regular visitor, how are you everybody?

    This post posted at this web page is actually good.

  19. I’m not sure why but this website is loading extremely slow for me.
    Is anyone else having this issue or is it a issue on my end?
    I’ll check back later and see if the problem still exists.

  20. Hello, i think that i saw you visited my blog thus i got here to go back the prefer?.I’m attempting to find things to
    improve my site!I guess its ok to use a few of your ideas!!

  21. For a merchandise of years, Peeep in component has acted ass the litmus try for breaking tidings stories;
    the connexion and of program tarradiddle is measured bby whether it’s big to taste on the gregarious fabric, and how soprano.

    Onee of thhe most important things too note is that the
    SEC is not aligned with government or any political parties.
    Generally, expect the inflatiion ratee to be 5% every year, though itt could be more or less.

  22. In a previous life I was a muetcatter. You chtlin, liver and menudo -eate28099n homies can collectively bite me.Darn skippy. I have a bestie married to a Mexican. He eats everything. I can’t even cut the fins offa a fish when I fillet and fry em. He puts his little pinkie up in the air as he munches upon the fins. Like that makes em taste better .He was peeved that I didn’t request the liver and heart of Poke Chop . We still have Maryann’s head in the freezer. Just don’t have the time to make tamales yet. Maybe summertime? /I know it’s not Christmas, dangit.

  23. The doctor gave her Uncle Henrye28099s magic eiilxr with push IV fluids and got her BP down from a pretty hi level really quick. Heh. Squawk thinks he’s a paramedic. ***snort, snort, chuckle-chuckle*** /thank you, Lord, for answered prayers and having BSue in his life. Again.

  24. However, unsightly dental problems can undermine an otherwise positive image.
    Similarly, oral surgeons will also effort to
    right any difficulties in the teeth, facial bones, or jaws.
    After this first visit, the dentist will suggest
    a schedule of follow-up visits.

  25. Hello, after reading this amazing article i am
    too glad to share my experience here with friends.

  26. Thanks for the great info dog I owe you bitgigy.

  27. Thanks for the advice on credit repair on this web-site. Some tips i would offer as advice to people is always to give up the particular mentality they will buy right now and pay out later. Like a society most people tend to do that for many factors. This includes getaways, furniture, along with items we want. However, you’ll want to separate your current wants from the needs. When you’re working to improve your credit rating score you really have to make some sacrifices. For example it is possible to shop online to save money or you can turn to second hand shops instead of costly department stores regarding clothing.

  28. My brother recommended I might like this blog. He was totally right.
    This put up actually made my day. You can not believe simply how so much time I
    had spent for this info! Thanks!