Mootools: reconociendo el browser

13/Feb/2008 521

La idea de un framework es reordenar un lenguaje y entregarnos herramientas para que sea bastante más fácil nuestro desarrollo. Una de ellas, es el reconocimiento del browser del usuario. En 2monos quise hacer lo mejor de lo mejor, pero lamentablemente IE6 no me acompañó en este camino. En vez de desgastarme tratando de que por lo menos se viera algo decente, o funcione a medias…. preferí abolirlo de una vez por todas. Si entras a utilizando IE6, una ventana te indicará que mejor bajes Firefox. Lamentablemente esta es una acción que por más que lo deseemos no se puede ejecutar en todos los sitios web en que trabajamos, pero en este caso como este sitio es mío, hago lo que quiero y decidí por discriminar un browser que nunca debería haber sido una mayoría.

Para esto, con Mootools es extremadamente fácil. Primero, creamos el evento inicial que gatillará la acción cuando los elementos del HTML (DOM) estén cargados. Luego, una codicional (if/else) que me dirá si el browser es IE6, ejecuta tal acción:

window.addEvent('domready', function(){
          // haz algo aquí

Ver ejemplo

A seguir, una lista de las posibilidades de browsers a ser detectables:

  • window: cualquier browser.
  • cualquier Internet Explorer.
  • window.ie6: sólo IE6.
  • window.ie7: sólo IE7.
  • window.gecko: Mozilla Firefox u otro browser que use gecko (Netscape 6+, Flock, Camino, Galeon, Epiphany).
  • window.webkit: Apple Safari u otro que use Webkit (iCab, Konqueror, Omniweb, Shiira, Sunrise).
  • window.webkit419: Apple Safari 2.
  • window.webkit420: Apple Safari 3.
  • window.opera: sólo Opera.



  1. can viagra stop working [#]

    It’s in point of fact a great and helpful piece of information. I’m glad that you just shared this useful info with us.
    Please stay us up to date like this. Thank you for sharing.

  2. amoxicillin dose ear infection child [#]

    Good article. I will be facing many of these issues as well..

  3. [#]

    I think everything published was very logical. However, consider this, what
    if you added a little information? I ain’t saying your content isn’t good., however suppose you added something that makes people want more?

    I mean Mootools: reconociendo el browser | CSSLab |
    Laboratorio de ideas web is kinda vanilla. You might look at Yahoo’s home
    page and see how they create post titles to grab people to click.

    You might add a video or a related picture or two to grab readers excited about what you’ve
    got to say. In my opinion, it could bring your website a little livelier.

  4. Gazcheedarap [#]

    cialis 20mg for sale

  5. clomiphene otc [#]

    Quality content is the important to invite the people to pay a
    quick visit the website, that’s what this website is providing.

  6. tadalafil tadalafil 40mg [#]

    I was wondering if you ever thought of changing the structure of your site?
    Its very well written; I love what youve got to say. But maybe you could
    a little more in the way of content so people could connect with it better.

    Youve got an awful lot of text for only having one or two images.
    Maybe you could space it out better?

  7. apcalis 2.5 mg price [#]

    Thanks for any other wonderful article. The place else may anyone get that kind of information in such an ideal approach of writing?
    I’ve a presentation next week, and I’m on the
    search for such information.

  8. gay filipino dating [#]

    gay dating bahrain

  9. Gazcheedarap [#]

    cialis tablets uk

  10. stromectol cost [#]

    stromectol 3 mg price Mootools: reconociendo el browser | CSSLab | Laboratorio de ideas web stromectol

  11. MarvinFuh [#]

    how much does viagra cost
    prescription drugs from canada prices how to order viagra from canada cialis from.canada viagra prescription from canada free sample of viagra canadian drug companies cialis without a doctors prescription buying medications in canada canadian levitra candida viagra
    where to buy viagra online buy viagra online at canada drugs online mail order viagra

  12. long gay dating games [#]

    kevin huckaby dating gay

  13. [#]

    ivermectin 3mg tablets Mootools: reconociendo el browser | CSSLab | Laboratorio de ideas web stromectol

  14. gay anime boy dating simulator [#]

    gay speed dating stockholm

  15. gay bi dating sites [#]

    dating for trans gay guys

  16. Pawan Kalyan Bhagat Singh [#]

    Thanks for sharing, this is a fantastic article post.Thanks Again. Keep writing.

  17. hydroxychloroquine and kidney disease [#]

    Hi, i think that i saw you visited my website thus i came to “return the favor”.I am trying to find things to enhance my website!I
    suppose its ok to use a few of your ideas!!

  18. our quest bars [#]

    This website was… how do you say it? Relevant!!
    Finally I’ve found something which helped
    me. Kudos! quest bars quest bars

  19. ivermectine [#]

    how much is ivermectin Mootools: reconociendo el browser | CSSLab | Laboratorio de ideas web ivermectin for humans for sale

  20. hydroxychloroquineMt [#]

    hydroxychloroquine buy online hydroxychloroquine over the counter difference between chloroquine phosphate and hydroxychloroquine

  21. white asian gay dating [#]

    is dating site hinge gay

  22. [#]

    Its like you read my mind! You appear to know so much about
    this, like you wrote the book in it or something.

    I think that you can do with a few pics to drive the message home
    a little bit, but instead of that, this is great blog. A
    great read. I’ll certainly be back. asmr asmr

  23. [#]

    No matter if some one searches for his vital thing, so he/she wishes to be available that in detail,
    thus that thing is maintained over here. scoliosis surgery scoliosis surgery

  24. HenryUnfiP [#]

    grindr gay dating sites
    gay sex dating game
    gay male dating site pakistan

  25. [#]

    Hey there just wanted to give you a quick heads up and let you know a few of the images aren’t loading correctly.
    I’m not sure why but I think its a linking issue.
    I’ve tried it in two different browsers and both show
    the same results. quest bars quest bars

  26. [#]

    Hi mates, how is the whole thing, and what you wish for to say concerning
    this paragraph, in my view its genuinely awesome designed for me.
    cheap flights cheap flights

  27. Mobile recharge [#]

    What a beautiful blog

  28. [#]

    If some one desires to be updated with newest technologies afterward he must be pay a visit this web site and be up to date everyday.
    scoliosis surgery scoliosis surgery

  29. where to buy tadalafil tablets for humans [#]

    I was more than happy to uncover this site. I wanted to thank you for your time just for this wonderful
    read!! I definitely liked every bit of it and I have you saved as a favorite to check out new
    information in your blog.

  30. HenryUnfiP [#]

    gay speed dating long beach
    gay dating in michigan
    philippines gay dating

  31. Garcheedarap [#]

    lasix for horses for sale

  32. how does hydroxychloroquine help lupus [#]

    It’s impressive that you are getting thoughts from this article as well as from our dialogue made at this time.

  33. $10 zyrtec coupon [#]

    lytx drivecam –

  34. nurtec copay card [#]

    zyrtec 5 mg tablets –

  35. benadryl [#]

    cetirizine costco –

  36. ivermectin on ebay [#]

    ivermectin pills for scabies

    flag macronutrients song

  37. cheap stromectol [#]

    ivermectin drug interactions

    mount ventricular tachycardia ally

  38. [#]

    stromectol 6 mg ivermectin for humans for sale bula ivermectina

  39. isotretinoina [#]

    buy isotretinoine how does accutane work

  40. provigildrug [#]

    modafinil vs adderall adderall vs modafinil

  41. provigilcost [#]

    modafinil pill

  42. bactrim antibiotic [#]

    bactrim ds side effects dosage trimoxazole ds

  43. GustavoVet [#]

    build my resume for me
    papers for sale