Written by
David Artiss. Published 10 months, 1 week ago. Last modified 2 weeks, 4 days ago. In categories
Web Development,
Wordpress.
One of the problems with having external scripts on your site is that you have little control over them – caching and the like are out of your hands.
The solution I’m using, via cPanel, is a weekly cron job that copies external scripts to a folder on my own server. And it will only do this if the script has only changed, as well.
I’m no Linux expert (or probably even amateur, if I’m honest) so it took a while to find the right code to use, but here is the result…
wget -N --directory-prefix=[local folder] [script location]
Simply change [local folder] to where you wish the script to be copied to and [script location] to where the external script is held (including script name). If you wish to perform multiple copies you can append them together with &&.
So an example may be…
wget -N --directory-prefix=public_html/wp-content/themes/artiss http://pagead2.googlesyndication.com/pagead/show_ads.js
This would copy the AdSense code show_ads.js to a theme folder named “artiss”.


Written by
David Artiss. Published 10 months, 1 week ago. Last modified 1 month ago. In categories
News,
Web Development,
Wordpress.
I know there’s been a lack of content recently. However, this is due to a number of factors…
- I’m very busy on version 2 of my YouTube Embed plugin – a huge change and my most complex plugin yet – this is taking a big chunk of my time.
- I’m using the excellent new Google Page Speed Online to look at various improvements to site speed. I’ve also been, and will continue to, making changes to this site.
- Spent far too much time trying to sort out a technical issue with Streamline. It’s still not resolved and I’m sure, at the rate they’re going, a rant post is imminent.
- I get a lot of this work done at home in the evening. However, I’m looking at moving house so apart from traipsing around various properties, I’m also getting lots of DIY done as well.
I’m also expending a bit of time preparing for my birthday in a couple of weeks time. It’s a, erm, “special” birthday and I’ve asked for money or Amazon gift vouchers – I’ll then be the proud owner of a Playstation 3! I should add that all the preparation is deciding what games and accessories to buy 
However, I do have a couple of articles to publish so, when I find time, I’ll try and get those completed.

