Learn free online HTML5, javascript, and jquery Tutorials by Examples

Monday 2 June 2014

How to test JavaScript code performance

--------------------------------------------
<script src="http://http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> 
 <script>
console.time('timerName');
    $(document).ready(function(e) {
        alert(); // Your javascript code to test here

    });
console.timeEnd('timerName');
</script>


--------------------------------------------

No comments:

Post a Comment