Reputation: 4459
While testing page loading time on https://developers.google.com/speed/pagespeed/insights/?url=aishwat.com it says
Eliminate render-blocking JavaScript and CSS in above-the-fold content
and lists down few javascripts (which you may look at link provided)
Now, I am using these as base scripts angular.min.js, angular-animate.min.js, angular-aria.min.js, angular-material.min.js And they need to be loaded in this particular order (one can't load angular animate before angular)
The question is how to make them non blocking ?
I have already kept them outside head block
Source code : https://github.com/aishwat/aishwat.com/blob/develop/public/index.html
Plz have a look at source page
Upvotes: 0
Views: 172
Reputation: 16837
The PageSpeed insight site has a good documentation what you can do to prevent it.
To make your javascript non-blocking you can add the async
or defer
attributes to your script tags. To maintain the order it is recommended to use defer
.
<script defer src="my.js">
I see your <script>
tags are outside of your <body>
, this is not valid HTML so I recommend putting them back at the head or somewhere in your body.
Upvotes: 1