Re: [PHP] slowness mystery
- Date: Wed, 4 Jun 2008 11:25:52 -0400
- From: "Eric Butera" <eric.butera@xxxxxxxxx>
- Subject: Re: [PHP] slowness mystery
On Wed, Jun 4, 2008 at 10:01 AM, Bastien Koert <phpster@xxxxxxxxx> wrote:
>>
>>
>>
>> Make it write out a static .js file and link to that. Apache can
>> serve up files like that way faster directly than piping it through
>> php. If you don't want to go through that hassle, make sure you have
>> a far future expire header on the file so that the client does not
>> request it each time.
>
> Eric,
>
> How do I do that? I generally embed the js file in the html that gets sent
> down
>
> <head>
> <script type='text/javascript' src='my.js'></script>
> </head>
>
>
> How can I set the expiry header? I know I can use php to send that header,
> but how when its as above? Is that an apache setting?
>
>
> Thanks,
>
> --
>
> Bastien
>
> Cat, the other other white meat
http://www.thinkvitamin.com/features/webapps/serving-javascript-fast
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php