Re: large external script to include in many pages
| From: | Chris Lee | Date: | Tue, 14 Aug 2001 00:06:12 +0000 |
| Subject: | Re: large external script to include in many pages | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62520@lists.php.net to get a copy of this message | ||
putting something like <script src="../myscript.js"> isnt really going to
speed things up at all. the browser will still have to open myscript.js and
read all 600 lines from there. if you ask me on GET / HTTP/1.1 call is
faster then two. I would just include_once('../myscript.html'); in the file
you want it to be in. maybe Ive missunderstood. correct me if so.
--
Chris Lee
lee@mediawaveonline.com
"Web Manager" <web@inter-resa.com> wrote in message
news:3B78516F.9257D44A@inter-resa.com...
> Henrik Hansen wrote:
> >
> > web@inter-resa.com (Web Manager) wrote:
> >
> > > Hello,
> > >
> > > I am testing a new DHTML code for navigation menus. I plan to use it
> > > throughout my web pages made with PHP. The script is about 600 lines
> > > long!
> > >
> > > Beside making a :
> > >
> > > define (script1, "" .
> > > "" .
> > > "" .
> > > "");
> > >
> > > and calling the script1 name in my PHP pages...
> > >
> > > this will be very, very long, is there a another way to create a kind
of
> > > variable ($myscript == 600 lines of the DHTML) that I could simply
call
> > > out in all my pages. Something like a <script src="../myscript.js">
> >
> > I would go with the script tag if I were you.
> >
> > --
> > Henrik Hansen
>
>
> Hello,
>
> well, I can't... I have HTML code (image tags) in the DHTML script and
> this can not be in a .js file...
>
> Thanks for your input!
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Marc Andre Paquin