473,385 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Thoughts on

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
Jul 23 '05 #1
2 1113
Ivo
"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
Jul 23 '05 #2
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
"Ivo" <no@thank.you> wrote in message
news:40**********************@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

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

30
by: Stephen Horne | last post by:
Some more looping thoughts - this time on integer for loops... There may be some hint towards PEP284 (integer for loops) in a review of ideas from other languages, but I'm damned if i can figure...
8
by: Edward K. Ream | last post by:
The documentation for encoding lines at C:\Python23\Doc\Python-Docs-2.3.1\whatsnew\section-encodings.html states: "Encodings are declared by including a specially formatted comment in the...
39
by: Marco Aschwanden | last post by:
Hi I don't have to talk about the beauty of Python and its clear and readable syntax... but there are a few things that striked me while learning Python. I have collected those thoughts. I am...
1
by: Steve | last post by:
I'm still a database newbie so I would like to solicit thoughts about the smartest way to do something in sqlserver. My company has a web application that we customize for each client. We can...
4
by: Rajan | last post by:
Hi All C++ Experts Can anybody share some of your thoughts in Member Function Templates implementation.Can you also give some example on it Best Regards Raj
35
by: Justin Weinberg | last post by:
My thoughts on this.... http://msdn.microsoft.com/vbasic/Future/default.aspx?pull=/library/en-us/dnvs05/html/vb9overview.asp My thoughts: 1. Regarding Implicit types, I don't use type...
2
Stang02GT
by: Stang02GT | last post by:
Hello, I would just like to get your thoughts/ideas/suggestions on how I should go about createing a VERY SIMPLE purchasing system. A friend has asked me help him develop a simple purchasing...
1
Stang02GT
by: Stang02GT | last post by:
Hello, I'm looking for your thoughts, ideas, and suggestions on this situation. I have recently been given the task to "fix" a menu within the companies intranet site. The current menu...
0
by: grazzy.cool | last post by:
"Change your language and you change your thoughts." Learn English and free download Grammar & dictionary. Just click the website and share ur thoughts…. "Language shapes the way we think, and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.