title: Slow refresh in Javascript/PHP
body: <p>I have a site that through a piece of javascript and php code takes a folder, randomly picks an image and then shows it in a div tag on the page. Whilst all this works properly, showing the image in the right size and all. There is still a minor issue, it is pretty slow. Upon clicking the refresh button, it instantly shows an image, though if pressed again it won't instantly show a new image unless pressed after 10 or so seconds. Whilst this of course, is a minor issue, it is pretty annoying. I've tried a few things such as using html meta tags to clear the cache/not store it in order to always refresh, but it didn't work. I've also tried numerous of different javascript code that I found on stackoverflow.com of other ways to do it, but they all seemed to only refresh if pressed after 10 or so seconds.</p>
  
  <p>Considering there's quite a lot of code. I've put the code into a pastebin for simplicity.</p>
  
  <p>Note that the PHP code is borrowed from the WWW, and I have done very minor changes to it, less than none except adding the last line of code.</p>
  
  <p><a href="http://pastebin.com/wwys5r3E" rel="nofollow">http://pastebin.com/wwys5r3E</a></p>
  
  <p>Hope we can find a solution together, thanks!</p>