Camera icon indicating copy to clipboard operation
Camera copied to clipboard

Images with "?" in their URL won't load at all

Open sattes-faction opened this issue 12 years ago • 3 comments

I'm showing some images generated by a script, which have an URL like image.php?file=foo.jpg

These paths get extended by a unique timestamp - but it is not checked if the URL already contains GET parameters and appends it just with ?23423422 for example (line 1096 in camera.js). This results in broken URLs that won't load at all (at least here in Google Chrome):

image.php?file=foo.jpg?23423424

Besides that being a bug, I'm not quite sure if it's necessary to append a unique timestamp for caching purposes. I think this should be done either via .htaccess or be appended by the user that's defining the image paths. In my case I explicitly want the images to be cached and therefore have to remove it in the code. It should be a config option at least if you want to stick to it ;-)

sattes-faction avatar Jun 26 '12 14:06 sattes-faction

Please, read the Google group about this issue. I added a timestamp because of a bug on IE8. I could release aversion of Camera that checks if another variable in the image url is already present and changed the question mark with a &

Manuel :-)

Inviato da iPad

Manuel Masia – Pixedelic via Brescia, 15 47841 - Cattolica (RN) p. iva 03718310406

http://www.pixedelic.com http://www.consorziocreativo.com http://themeforest.net/user/pixedelic https://twitter.com/#!/pixedelic http://dribbble.com/pixedelic http://www.facebook.com/pages/Consorzio-Creativo/209711855772

Il giorno 26/giu/2012, alle ore 16:15, [email protected] ha scritto:

I'm showing some images generated by a script, which have an URL like image.php?file=foo.jpg

These paths get extended by a unique timestamp - but it is not checked if the URL already contains GET parameters and appends it just with ?23423422 for example (line 1096 in camera.js). This results in broken URLs that won't load at all (at least here in Google Chrome):

image.php?file=foo.jpg?23423424

Besides that being a bug, I'm not quite sure if it's necessary to append a unique timestamp for caching purposes. I think this should be done either via .htaccess or be appended by the user that's defining the image paths. In my case I explicitly want the images to be cached and therefore have to remove it in the code. It should be a config option at least if you want to stick to it ;-)


Reply to this email directly or view it on GitHub: https://github.com/pixedelic/Camera/issues/10

pixedelic avatar Jun 26 '12 17:06 pixedelic

Hi Manuel,

thanks for your reply, I wasn't aware of this IE8 bug.

But it would be great if the question mark issue could be fixed in the next release :-)

Simon

sattes-faction avatar Jun 26 '12 18:06 sattes-faction

Hi. Please add the option to remove the timestamp.

kratkar avatar Feb 10 '14 20:02 kratkar