Re: slowness mystery
| From: | Eric Butera | Date: | Wed, 04 Jun 2008 15:25:52 +0000 |
| Subject: | Re: slowness mystery | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-275010@lists.php.net to get a copy of this message | ||
On Wed, Jun 4, 2008 at 10:01 AM, Bastien Koert <phpster@gmail.com> 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