Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Thoughts on

Reply
Thread Tools

Thoughts on

 
 
Ian
Guest
Posts: n/a
 
      06-03-2004
Hi there,

I wanted to get anybodys thoughts on using the following...

<script src="http://test.com/myscript.js"></script>

for including functions etc in the html page, of course I could embed all
the functions but wondered if anybody thinks that this is a more organised
way or should I stay clear and always insert the function of javascript
directly into the html

Any thoughts?

Ian


 
Reply With Quote
 
 
 
 
Ivo
Guest
Posts: n/a
 
      06-03-2004
"Ian" wrote
> I wanted to get anybodys thoughts on using the following...
>
> <script src="http://test.com/myscript.js"></script>
>
> for including functions etc in the html page, of course I could embed all
> the functions but wondered if anybody thinks that this is a more organised
> way or should I stay clear and always insert the function of javascript
> directly into the html
>
> Any thoughts?


Should I buy apples or pears? As so often, it depends. Each separate file
takes its size plus a bit (the making of the request) to download, so
keeping the number of files to a minumum is good. But if code is used on
multiple pages, it is better to allow browsers to make use of their caches
(it 's what they 're for), repeatedly downloading the same thing is foolish
of course.
If you can do serverside includes, maintaining code that is included in each
page can be done centrally, otherwise there might be an extra argument for
..js files.
HTH
Ivo


 
Reply With Quote
 
 
 
 
Ian
Guest
Posts: n/a
 
      06-03-2004
thanks for the reply!

Ah server side includes, meaning that the Client Javascript is inserted on
the server before it is sent to the client?? Is this correct?

I am using asp.net C# ... any ideas how to use server side includes to
insert the client javascript?

Thanks

Ian


"Ivo" <(E-Mail Removed)> wrote in message
news:40bef3cc$0$1737$(E-Mail Removed)...
> "Ian" wrote
> > I wanted to get anybodys thoughts on using the following...
> >
> > <script src="http://test.com/myscript.js"></script>
> >
> > for including functions etc in the html page, of course I could embed

all
> > the functions but wondered if anybody thinks that this is a more

organised
> > way or should I stay clear and always insert the function of javascript
> > directly into the html
> >
> > Any thoughts?

>
> Should I buy apples or pears? As so often, it depends. Each separate file
> takes its size plus a bit (the making of the request) to download, so
> keeping the number of files to a minumum is good. But if code is used on
> multiple pages, it is better to allow browsers to make use of their caches
> (it 's what they 're for), repeatedly downloading the same thing is

foolish
> of course.
> If you can do serverside includes, maintaining code that is included in

each
> page can be done centrally, otherwise there might be an extra argument for
> .js files.
> HTH
> Ivo
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SOHO VPN design thoughts Timo.Green@gmail.com Cisco 4 09-22-2005 07:00 PM
Post your thoughts on the best hardware manufacturers ww_crimson Hardware 19 07-17-2005 02:40 AM
Thoughts on Catalyst 2948G-GE-TX? Dan Rice Cisco 0 06-23-2005 07:59 PM
Thoughts on WEP in WPA WLAN? Al Blake Cisco 3 05-17-2005 05:34 AM
Your thoughts on dual PIX 501 access - redundant SOHO access mh Cisco 6 05-10-2004 04:32 PM



Advertisments