Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE + Firefox, one browser displays images one does not

Status
Not open for further replies.

RBP

Programmer
May 5, 2001
88
GB
Can anyone answer this? I don't want to build problem sites.

Some sites I have viewed display images and text normally in IE, but in Firefox textual content is displayed, but not one image. I have at least one example, but I'm trying to remember the URL)

The path to the images file is in the format -../../images/,(is this a good idea? I've only seen image files in this format "/images/blah.gif" OR "../images/blah.gif" etc.)

Does anyone have any ideas why this affects one browser but not another?

I know that IE has a lot to answer for and this is not an exact science, but in my experience FF is a nice compliant browser.
Ta in advance.
 
There are three types of paths, and all are supported by FF, Opera and IE (as well as most/all other current browsers).

Relative links:
images/someimage.png
./images/someimage.png
../images/someimage.png
These are from the current directory the page with the image is in (or the CSS file that calls the picture if it's in the CSS and not in the (X)HTML). If you move the page the image breaks.
(single dot or no dot slash mean from the current location)
(dot dot is back one directory in the tree)

Absolute from Webroot
/images/someimage.png
These will always begin with a slash. This means if you move the page within the site and the image will be find (unless you move the image).

Absolute URL
These will work even if you move the site to another server.


Whatever was causing the broken images in FF must have been something else about the image -- like having images turned off in FF or some server side script...

[plug=shameless]
[/plug]
 
It's impossible to say. Your syntax should work on both browsers.

As for how smart it is to use that kind of relative reference it depends on your code. I personally prefer the absolute links from the webroot, but that is strictly a personal choice. Whatever works for you.

Check the picture extension (I am sure IE can show bmp, but I am not sure about FF) and check for spaces in the names of pictures and folders (FF might be less forgiving when it comes to space handling). Apart from that I can't really help you much more.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Thanks for the hints folks, have a look at I think that displays missing images in FF but not IE6, I had several other examples, but can't find them - perils of yellow stickies!
 
The page looks exactly the same in FF, IE6 and IE7 for me. No missing images anywhere.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
How odd is that? I don't see images in FF, but do in IE, I don't have images turned off in FF, will check more, very odd........thx
 
Further update,
I tried another pc,FF and IE display all images ok.

The first PC does not display images in FF, but it only seems confined to this site, if I open other TABS I can see images on other sites.

I think I'll go and lie down now!
 
How about a caching issue? Did you try force refreshing via shift + reload?

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Yup tried that, also my caches are set to bare minimum anyway.
 
And you checked the options that you're not blocking images from this particular website on this particular FF?

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
yep, compared it to the settings on the other pc. Weird!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top