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

https://news.ycombinator.com/item?id=3887448
by ChrisNorstrom • 14 years ago
1 1 14 years ago

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.

Related Stories

Loading related stories...

Source preview

news.ycombinator.com