Title: Defer parsing javascript
Last modified: September 1, 2016

---

# Defer parsing javascript

 *  [johanna2patricia](https://wordpress.org/support/users/johanna2patricia/)
 * (@johanna2patricia)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/defer-parsing-javascript-3/)
 * Hi everybody,
    I am trying to speed up my sites and came across “defer parsing
   javascript”. I read a lot about it and understand you can put a code in your 
   funtions.php. I did that, in the child theme of my theme, but that didn’t work.
   This is the code I used:
 *     ```
       // Defer jQuery Parsing using HTML5’s defer property
       if (!(is_admin() )) {
       function defer_parsing_of_js ( $url ) {
       if ( FALSE === strpos( $url, ‘.js’ ) ) return $url;
       if ( strpos( $url, ‘jquery.js’ ) ) return $url;
       return "$url’ defer ";
       }
       add_filter( ‘clean_url’, ‘defer_parsing_of_js’, 11, 1 );
       }
       ```
   
 * The admin part is to let texteditors in the admin work alright.
    But also without
   that part I see no difference in the gtmetrix score. I also tried the WP deferred
   javascripts plugin, but that didn’t solve it either. The defer parsing in Gtmetrix
   is still at 0. I also changed themes to the Twenty Eleven theme to see if it 
   is theme related, but that didn’t solve it either. What am I missing here? Anybody
   has an idea?
 * Johanna

The topic ‘Defer parsing javascript’ is closed to new replies.

## Tags

 * [Defer parsing JavaScript](https://wordpress.org/support/topic-tag/defer-parsing-javascript/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [johanna2patricia](https://wordpress.org/support/users/johanna2patricia/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/defer-parsing-javascript-3/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
