News for hackers. Stuff that matters.

Ask HN: Is it alright to have internal Javascript on a 1 page website?

The site in question is TimeForZen.com. It relies heavily on JavaScript and there 3 javascript files:

- 1st one is Jquery which loads from Google so it's most likely hosted and cached on the user's computer. - 2nd one is 5kb and minified - 3rd one is 33kb and minified

Should I just include them in the index page (32kb non-minified) internally so that there are less server requests? I'm just getting into JavaScript and am a complete noob when it comes to these things. I know it's best to keep JavaScript external so it can be cached and used on other pages, but this is a ONE page site. It will NEVER expand past one page.

( 1 comment | on HN )
Re:Ask HN: Is it alright to have internal Javascript on a 1 ... by imaginationac on Tuesday April 24, 2012 @11:13PM (#3887506)
4 (5 including the favicon) isn't that bad, especially if it's done in parallel.