Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Feb 2005
    Posts
    190
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Using Modernizr in Production question

    hey, i know it's lame but i usually just use the minified dev build of modernizr in most of my production builds because i'm usually behind schedule and just worn out post launch and don't feel like dealing. trying to go back and optimize some stuff and wondering like how to figure out what modernizr components i really need? like what are the most common core features used for a standard html5/css3 site that would be the base foundation. not sure why but it's just not clicking with me how to go back into an existing build and figure out what i need and dont need.

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,189
    Thanks
    10
    Thanked 569 Times in 550 Posts
    you should know what you're using it for if you added and used it...
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/1/19) IE7:0.2, IE8:6.7, IE11:7.4, IE9:3.8, IE10:4.4, FF:18.3, CH:43.6, SF:7.8, MOBILE:27.5

  • #3
    Regular Coder
    Join Date
    Feb 2005
    Posts
    190
    Thanks
    6
    Thanked 0 Times in 0 Posts
    i should. but i don't. these are older sites, and i don't remember. trying to adopt better habits moving forward. trying to correct past mistakes. looking for some advice.

  • #4
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,189
    Thanks
    10
    Thanked 569 Times in 550 Posts
    Quote Originally Posted by wyclef View Post
    i should. but i don't. these are older sites, and i don't remember. trying to adopt better habits moving forward. trying to correct past mistakes. looking for some advice.
    well, you can modify the modrnizr lib to log all incoming calls, save to a test/temp js file, run your app with the new script, and then view the log.

    also, simpler, a "profile" in the chrome dev tools or firebug should tell you the names of all functions invoked. You can likely get a rough outline from the profile data, though it won't be without noise. Usually, a non-minified full source version of any lib is easier to trace through profiling than short-named code full of anon functions.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/1/19) IE7:0.2, IE8:6.7, IE11:7.4, IE9:3.8, IE10:4.4, FF:18.3, CH:43.6, SF:7.8, MOBILE:27.5

  • #5
    Regular Coder
    Join Date
    Feb 2005
    Posts
    190
    Thanks
    6
    Thanked 0 Times in 0 Posts
    thanks. i'll probably check out chrome first as i'm not sure off hand how to log the incoming calls.

  • #6
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,189
    Thanks
    10
    Thanked 569 Times in 550 Posts
    Quote Originally Posted by wyclef View Post
    thanks. i'll probably check out chrome first as i'm not sure off hand how to log the incoming calls.
    if there is a modernizr function, or any function in the code really, you can jsut add one line to the top of the function:

    console.log("CALLING:", arguments.callee.name, arguments);

    if the function is strict, this won't work, so you'll have to replace "arguments.callee.name" with a meaningful name, like "modrnizr main"...
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/1/19) IE7:0.2, IE8:6.7, IE11:7.4, IE9:3.8, IE10:4.4, FF:18.3, CH:43.6, SF:7.8, MOBILE:27.5


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •