I have a website and I added the expire headers on all pages/images and scripts but I don’t know how I could add expire headers to external scripts.
For example Goo
The only way is to create script which downloads contents from external site and then adds needed headers.
To
And external.php is something like
Of course this has security hole so I'd recommend to use identifier strings like external.php?file=foo.js and then using
$files = array('foo.js' => 'http://external/...');
if(isset($files[$_GET['file']]))
{
echo file_get_contents($files[$_GET['file']]);
}
file_get_contents() of course will take some of your bandwith so it would be recommended to cache the result also.