I have image folders where I use dashes in the name for example: "images/01-12-2011/example.jpg"

When I insert this image into my html. Internet explorer(9) shows the image but Firefox and chrome doesn't show it. When I type it to the url: (blabla.com/images/01-12-2011/example.jpg) then i can see the image.

What could be the reason and the solution?

thanks in advance

  • Have you viewed the HTML source in each browser or used something like Fiddler to see what is being requested?
    – Rob
    May 16 '11 at 19:45
  • yup, i have checked it and it seems correct. Can it be connected with the settings of Cpanel?
    – nacon
    May 18 '11 at 18:19

It's most likely that the path to your image is broken, and the browser that's showing the image correctly has the file cached.

Consider the following HTML:

<img src="images/01-12-2011/example.jpg" />  
<img src="/images/01-12-2011/example.jpg" />

In the first line of code, the img tag tells the browser to look for the image in a sub-folder based off the current URL — this is referred to as a relative link.

In the second line of code, the img tag instructs the browser to start from the root directory of your site when looking for the image — this is referred to as an absolute link.

If you're seeing the images in one browser, but not others (and you're viewing them using the same URL) your primary browser may just have the files cached.

Without seeing a code sample of the page, it's difficult to determine what else might be the problem.

  • when i change the folder name from "images/01-12-2011/example.jpg" to "images/01_12_2011/example.jpg" images work and i can see in all browsers. does it effect the seo results if use _ rather than - in the folder name. Or are there anything better?
    – nacon
    May 17 '11 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.