Thoughts on

I

Ian

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
 
I

Ivo

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
 
I

Ian

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top