Multiple <script type="text/javascript" src="mys.js"></script> OK?

J

joe

Is it OK to have multiple:

<script type="text/javascript" src="funcs1.js"></script>
<script type="text/javascript" src="funcs2.js"></script>
<script type="text/javascript" src="funcs3.js"></script>

?

And I need to use similarly multiple CSS:

<link href="blah1.css" rel="stylesheet" type="text/css" />
<link href="blah2.css" rel="stylesheet" type="text/css" />

Is that OK too?
 
B

blechler

Is it OK to have multiple:

<script type="text/javascript" src="funcs1.js"></script>
<script type="text/javascript" src="funcs2.js"></script>
<script type="text/javascript" src="funcs3.js"></script>

?

And I need to use similarly multiple CSS:

<link href="blah1.css" rel="stylesheet" type="text/css" />
<link href="blah2.css" rel="stylesheet" type="text/css" />

Is that OK too?

That's fine.
 
T

Tom Cole

Is it OK to have multiple:

<script type="text/javascript" src="funcs1.js"></script>
<script type="text/javascript" src="funcs2.js"></script>
<script type="text/javascript" src="funcs3.js"></script>

?

And I need to use similarly multiple CSS:

<link href="blah1.css" rel="stylesheet" type="text/css" />
<link href="blah2.css" rel="stylesheet" type="text/css" />

Is that OK too?

Sure. Just make sure that your multiple scripts don't share any
'global' variables, unless that's your intention.
 
J

Jeremy J Starcher

Is it OK to have multiple:

<script type="text/javascript" src="funcs1.js"></script> <script
type="text/javascript" src="funcs2.js"></script> <script
type="text/javascript" src="funcs3.js"></script>

?

And I need to use similarly multiple CSS:

<link href="blah1.css" rel="stylesheet" type="text/css" /> <link
href="blah2.css" rel="stylesheet" type="text/css" />

Is that OK too?

As others have said, thats fine.

There is a [small] performance hit for everything on the page that needs
to be downloaded. This includes all graphics, all style sheets, all
javascript files. If you ever run your document through one of those
speed-test programs, it may complain.

In reality, I don't worry about it... but I don't go overboard either.
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top