Re: [PHP] slowness mystery
- Date: Wed, 4 Jun 2008 10:01:49 -0400
- From: "Bastien Koert" <phpster@xxxxxxxxx>
- Subject: Re: [PHP] slowness mystery
>
>
>
>
> 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