1

I'm not using any WP cache plug ins. I've noticed that only one png out of the other pngs (and other images) I have on my WP site has a query string attached to it when I look at in Chrome dev tools. It's actually downloaded twice - with and without query string.

The other odd this is that Chrome Dev tools says that the intiator for the png with query string is jQuery. I just include jQuery from Google's CDN, so I'm not changing anything.

Any ideas to why just one of my pngs (why this one?) has a query string attached? Here's what it looks like:

<img src="http://www.mysite.com/wp-content/themes/myTheme/images/slide1Btn.png?1369071380764" alt="">

Please let me know if I haven't included enough information.

Edit This png is a button on one of the slides I have in a slideshow. I use http://archive.slidesjs.com/ to generate the slideshow. The png images are part of the HTML markup and not generated by the script, however I did find this line in the slides.js code:

// gets image src, with cache buster
    var img = control.find('img:eq(' + start + ')').attr('src') + '?' + (new Date()).getTime();

I would like to just have the png load once and just be retrieved from the cache on reloads - like each of the pngs will do on subsequent slides in my slideshow. I'm perplexed as to why it only happens to this png.

Mark Bubel
  • 375
  • 4
  • 15

2 Answers2

1

It might either be :

  • some argument for a script that dynamically generates or resizes or processes the image (it does not matter that the url has a .png extension, that doesn't necessarily mean that a png file is served statically)

  • a "cache breaker" - or "cache buster". This can be used to prevent the browser (sometimes also the server) to get the image from a cache, and force it to get it fresh from the server.

Because in this case this looks as a timestamp (unix epoch in milliseconds), I'd bet for the later.

Community
  • 1
  • 1
leonbloy
  • 73,180
  • 20
  • 142
  • 190
  • Thanks, you gave me some more hints when you mentioned cache breaker. I've edited my qustion with more information. – Mark Bubel May 20 '13 at 18:55
  • Well, as you've already found, that's an implementation detail in slidesjs library, in case you object to it, you should ask them https://groups.google.com/forum/?fromgroups#!forum/slidesjs – leonbloy May 20 '13 at 19:50
  • Ok, I'll check there and report back here with an answer. Thanks! – Mark Bubel May 20 '13 at 19:54
0

wordpress generates many of the images dynamically, meaning when you access the png you are calling a server page that generates the png dynamically choosing between different images or based on the query string parameters, like size for exmaple.

200px width image.

http://mysite.com/wp-content/uploads/2013/05/Giant_water_bugs_on_plate.png&w=200&h=446&zc=1&q=100

vs

600px width image

http://mysite.com/wp-content/uploads/2013/05/Giant_water_bugs_on_plate.png&w=800&h=446&zc=1&q=100
Dory Zidon
  • 10,497
  • 2
  • 25
  • 39