Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: image url with timestamp #13

GoogleCodeExporter opened this issue Mar 30, 2015 · 2 comments


Copy link

commented Mar 30, 2015

What steps will reproduce the problem?
1. Open an image with the following url pattern: "binary?id=4932

What is the expected output? What do you see instead?
I expected that the image would be rendered, instead I saw a broken image

What version of the product are you using? On what browser/operating system?

imgmap2.0 beta6r80
Mac OS X 10.5.2

Please provide any additional information below.

I see that you try to go around the browser caching mechanism on line 603
in the imgmap.js file by appending ?some_random_value

In some cases the system loads the image from an database, the url therefor
contains a ? sign. Eg. binary?id=4355. So when the image map is adding
another ? the image gets broken.

Here is a suggestion to solve this:

Check if the img contains a ?, if it does append an & instead.

example code: 

var q;
if (img.indexOf('?') > -1)
  q = '&';
  q = '?';

this.pic.src = img + q + (new Date().getTime());

Original issue reported on by on 18 Mar 2008 at 11:54


This comment has been minimized.

Copy link

commented Mar 30, 2015

Yep, you are right, i will fix that.

Original comment by on 24 Mar 2008 at 9:51

  • Changed state: Started
  • Added labels: ****
  • Removed labels: ****

This comment has been minimized.

Copy link

commented Mar 30, 2015

fixed in rev52

Original comment by on 9 Apr 2008 at 10:46

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.