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

Closed
GoogleCodeExporter opened this issue Mar 30, 2015 · 2 comments
Closed

Suggestion: image url with timestamp #13

GoogleCodeExporter opened this issue Mar 30, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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

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
TinyMCE 3.0.4.1
Firefox 2.0.0.12
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 = '&';
else
  q = '?';

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


Original issue reported on code.google.com by thomasan...@gmail.com on 18 Mar 2008 at 11:54

@GoogleCodeExporter
Copy link
Author

Yep, you are right, i will fix that.

Original comment by adam.mas...@gmail.com on 24 Mar 2008 at 9:51

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

@GoogleCodeExporter
Copy link
Author

fixed in rev52

Original comment by adam.mas...@gmail.com 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
Projects
None yet
Development

No branches or pull requests

1 participant