Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
<script> head section
Old 01-31-2004, 08:25 AM <script> head section
DaveTodd's Avatar
Evil Psycho Alien

Posts: 684
Location: Sheffield, England
Trades: 0
I'm looking to take the <script> section from the top of my web pages and put it into an external file. That way the main body of the website is higher up the page and will (hopefully) rank better on search engines.

The <script> section looks like this :

<script>
<!--
function popup(myUrl) {
var topBars = 'directories=no,location=no,menubar=no,status=no,t itlebar=no,toolbar=no,dependent=yes';
var myOptions = 'scrollbars=yes,width=500,height=400,resizeable=no ,top=0,left=0';
var myFeatures = topBars+','+myOptions;
var newWin = open(myUrl+'?referer='+document.URL,'',myFeatures) ;
newWin.focus();
}

function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>

the page it is taken from is www.safariquip.co.uk

Is is possible to make this section an external file that is called up by the page when it loads?
__________________
take care,
Dave ;)

Please login or register to view this content. Registration is FREE
DaveTodd is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-31-2004, 02:00 PM
Webmaster Talker

Posts: 589
Trades: 0
I think it could be done but it wouldent help your websites search engine rank. The search engine reads what the outcome of the page is not the hard code. The search engine see's it as all words. So putting your script in an external file wouldent help because it would still see the outcome of the script. Unless the script prints out a huge long pharagraph I suggest leave it the way it is.

I would like a second opinion on this because I am not totally sure of the answer I gave you only 99%
thevirus is offline
Reply With Quote
View Public Profile
 
Old 01-31-2004, 04:26 PM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Trades: 0
I back virus up with an extra 1%
__________________

Please login or register to view this content. Registration is FREE
- 100 Satisfied Customers - Custom Programming and Web Development
ACJavascript is offline
Reply With Quote
View Public Profile Visit ACJavascript's homepage!
 
Old 02-03-2004, 10:38 AM
DaveTodd's Avatar
Evil Psycho Alien

Posts: 684
Location: Sheffield, England
Trades: 0
SEO...the closer to the top of the webpage the text / source code is found, the better it ranks as the more important it is deemed to be.

If I can put 50 lines of code into one line, calling an external file, the text on the page will be made *much* more important and rankings will get higher.

Any suggestions for putting the code into an external file?
__________________
take care,
Dave ;)

Please login or register to view this content. Registration is FREE
DaveTodd is offline
Reply With Quote
View Public Profile
 
Old 02-03-2004, 11:13 AM
techwench's Avatar
Code Monkey

Posts: 1,449
Name: Danalyn
Location: Dallas, TX
Trades: 0
<SCRIPT LANGUAGE="JavaScript" SRC="your_script.js" TYPE="text/javascript"> </SCRIPT>
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
techwench is offline
Reply With Quote
View Public Profile
 
Old 02-03-2004, 05:15 PM
Webmaster Talker

Posts: 589
Trades: 0
Java script is unreliable in my opinion go for php . Sorry for giving you the wrong advice, but I was really 99% sure that the search engines only read the text and took the source code only into account! Sorry for missinforming you
thevirus is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to <script> head section
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.25156 seconds with 12 queries