Does including a js file really slow down pages?

They have: 16 posts

Joined: May 2000

Should I include a file or actually cut and paste its contents into my html document.
Also my pages seem to load everything before displaying anything on screen. It just fires out the whole page at once????? How can I get it to load on screen?
www.purplepages.ie is the site

They have: 67 posts

Joined: Aug 1999

Hi,
The reason .js files are so handy to use is that when you make modifications, you only need to modify that file and not have to edit and set up your whole page each time. The .js files you are using for your menu are probably not slow your page loading down, it only seems to happen if you are writing html into your page using them, not javascript.
The reason your page just pops straight onto the screen is because everything is inside tables and it loads the entire table before displaying it.
Hope this explains things for you.

Ian

------------------
Webmaster A1 JavaScripts
A1 JavaScripts
Web Development - Big Resources Inc
BIG Resources.com

Webmaster A1 JavaScripts
A1 JavaScripts
Web Development - Big Resources Inc
BIG Resources.com

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi,

Yes, there is an additional cost in loading a *.js -- because it is accessing the server. However, it is probably neglible and done only once. From there on in, any further includes (for other pages) are retrieved from cache.

Vinny

------------------
my site:GrassBlade: cut&paste javascript
moderator at:The Javascript Place
Javascript City

Where the world once stood
the blades of grass cut me still

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.