Many recommended scripts should go at the bottom of the page - does this include Cufon?

698 Views Asked by At

All front end developers out there will have heard some experts state that it is best practice to put scripts at the bottom of the page.

My question is, does this include Cufon also? (that us, if you are using Cufon of course).

As an aside.. I recently heard about http://headjs.com/. Same question here - can we put our Cufon script inside of this? Or would we risk having a 'Flash of Unstyled Content'

2

There are 2 best solutions below

2
On BEST ANSWER

You can definitely put this at the bottom of the page. However, just to mention don't forget to call Cufon.now() before </body> tag. Like:

<script type="text/javascript"> Cufon.now(); </script>
0
On

Yes it includes Cufon

There are some reasons to put scripts in the head, the 2 reasons I know of are to prevent a race condition by storing the functions in the head and execution data on the bottom; the other is based on ad requirements.