Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   Thoughts on (http://www.velocityreviews.com/forums/t877731-thoughts-on.html)

Ian 06-03-2004 08:53 AM

Thoughts on
 
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



Ivo 06-03-2004 09:47 AM

Re: Thoughts on
 
"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



Ian 06-03-2004 10:12 AM

Re: Thoughts on
 
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" <no@thank.you> wrote in message
news:40bef3cc$0$1737$abc4f4c3@news.wanadoo.nl...
> "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
>
>





All times are GMT. The time now is 08:05 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57