Forum Moderators: open

Message Too Old, No Replies

Calling up javascript

ssi include or external .js call

         

dauction

5:53 pm on Nov 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have an affiliate product (in javascript)that needs to go on a few hundred pages .

external .js would that be the "correct way"?

Fotiman

7:25 pm on Nov 29, 2006 (gmt 0)

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



There's no right or wrong way. External include, though, would be the better way because the script file could be cached by the browser.

dauction

7:54 pm on Nov 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Fotiman

cant seem to get it working yet..

I can get small scripts working just fine but this is a big Air Travel form script ..

I can simply do a Front Page 2003 "Page Include" but the problem is that the affiliate code is bloated adds far to much weight to the page .

So I want something to do server side call on it..so the actual affiliate code is actually on each page

I'm reading everything I can on SSI , and on external .js trying different things but nothing yet.

Is it because I am trying to call up a 3rd party script?

Fotiman

8:03 pm on Nov 29, 2006 (gmt 0)

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



Without seeing the details of how you're doing it (and what their script actually looks like), it's hard to offer any useful advice. The problem with the SSI approach is that it's still going to add a bunch of bloat to every page. In other words, the browser will need to download that much more for every single page, whereas an external file would be downloaded only once and then cached.

This is how you'd typically include a script file:

<script type="text/javascript" src="yourfile.js"></script>

How are you tring to include it?

dauction

8:28 pm on Nov 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



font I just sent you a PM with the script and how I went about trying to added it externally.

I may be taking an entirely wrong approach.. if you can glance at it and even let me know If I am even heading in the right direction ...

much appreciated

anuvatech

7:17 am on Dec 4, 2006 (gmt 0)

10+ Year Member



I agree with fotiman