Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Is it alright to have internal Javascript on a 1 page website?
1 point by ChrisNorstrom on April 25, 2012 | hide | past | favorite | 1 comment
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.



4 (5 including the favicon) isn't that bad, especially if it's done in parallel.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: