Forum Moderators: phranque

Message Too Old, No Replies

Going external with code

         

malcolmcroucher

5:32 pm on Nov 4, 2008 (gmt 0)

10+ Year Member



What does it mean to go external with code ?

like using an include in php or using external javascript ?

Regards

Malcolm

jatar_k

6:01 pm on Nov 4, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



means nothing to me

discerning what the person meant would depend on what their ambiguous job title might be

phranque

10:49 pm on Nov 4, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



in what context was that term used?

rocknbil

11:04 pm on Nov 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Most likely, it means removing all of your DHTML (read: Javascript or VBscript) and markup from the document, effectively separating content from presentation and exposing pure content to the search engines.

Even something as simple as this:

<a href="somelink.html" onClick="alert('boo');">BOO</a>

Can be external.

... <head>
<script type="text/javascript" src="external.js"></script>
</head>
<body>
<a id="mylink" href="somelink.html">BOO</a>

"external.js"


function attachBehaviors() {
if (document.getElementById('mylink') {
document.getElementById('mylink') onClick=function() { alert('boo'); }
}
}
window.onload=function () { attachBehaviors(); }

A PHP include is not "external" when it gets to the browser, the code has already been included in output. However, includes have a very useful function - that of compartmentalizing specific functions so it's easier to find and kill a bug. This is a different "kind" of external.

Quadrille

11:15 pm on Nov 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I haven't heard it described quite like that, but it may also refer to removing css from the main page to a separate file.

tangor

11:27 pm on Nov 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've heard it described as removing all elements that are NOT content, but are used to serve or service the page, to external files, particularly those elements that are repeated over a number of pages or site wide. Speeds the page for bots in some regards, and speeds loads for visitors examining more than a page or two.

encyclo

1:10 am on Nov 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you mean in the context of this thread [webmasterworld.com]?

tangor

2:18 am on Nov 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Actually, I was thinking of that recent video seminar via Yahoo not too long back. I don't keep good notes. Guess that's why I'm just a webmaster instead of being a real WEBMASTER! But, yeah, all that and more. :)

I code Green Acres... ie, dirt simple, so do not have many issues regarding code bloat.

malcolmcroucher

11:17 am on Nov 5, 2008 (gmt 0)

10+ Year Member



yes encyclo according to that thread "

>> Go external with scripting languages if you must have them - there is little reason to have them that I can see - they rarely will help a site and stand to hurt it greatly.

Does it primarily mean with javascript ?

i doubt includes woudl have much difference in php ?

im not to sure about asp.

phranque

12:16 am on Nov 6, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



yes that mostly means javascript and at the time that was written it included vbscript and to a certain extent it now also includes css.