title: How do I defer or async this WordPress javascript snippet to load lastly for faster page load times?
body: <p>I have various javascripts that are necessary plugins in one of my WordPress domains, and I know where in the php file it's called from.</p>
  
  <p>I'm taking every measure I can take to <strong>speed up page loading times</strong>, and every speed tester on the web says to defer javascripts if possible.</p>
  
  <p>I have read about the <strong>defer='defer'</strong> and the <strong>async</strong> functions in javascript and I think one of these will accomplish what I'm trying to accomplish.  But I'm not understanding how I'd do so in a php file.</p>
  
  <p>For instance, here is a snippet from one particular plugin's php file where the javascript file is being called:</p>
  
  <pre><code>function add_dcsnt_scripts() {
  
      wp_enqueue_script( 'jquery' );
      wp_enqueue_script( 'dcsnt', dc_jqsocialtabs::get_plugin_directory() . '/js/jquery.social.media.tabs.1.7.1.min.js' );
  
  }
  </code></pre>
  
  <p>I've read that it's best to do something like this for faster page loading times:</p>
  
  <pre><code>&lt;script defer async src="..."&gt;&lt;/script&gt;
  </code></pre>
  
  <p>But I don't know how to accomplish that within a php file.  I want to do this with all of my javascript files.</p>
  
  <p><strong>How would I accomplish deferring or asyncing this javascript snippet to is loads last and speeds up page load times</strong>?  What would be the ideal way to increase page load times across all browsers?  Thanks for any guidance anybody can offer!</p>