Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Image background displays during preview, but not once uploaded to server Reply To: Image background displays during preview, but not once uploaded to server

#278120
Beverleyh
Participant

Tip: Check letter-case in paths, filenames and extensions ;)

The reason — and I know I fell foul of this too when I uploaded my first website to a real server — is that most new devs start developing on a Windows computer, and Windows isn’t a case-sensitive environment. But, here’s the kicker, most (particularly budget) web hosts don’t use Windows for their server environments… they use Unix because, amongst other reasons, it’s free… and Unix is case-sensitive. So those times when your image is called “Picture.JPG” but you’ve typed “picture.jpg” in your code, it’s going to work fine locally on your home computer, but fall over on a web host’s server, where Unix is most likely being used as the OS.

So, check all paths, filenames and extensions of all your resources to make sure that your code matches them exactly. Also, try to get in the habit of only using lower-case if you can cos it gives you one less thing to worry about!

This might not be the answer to your question, but it’s a lesson that will most likely help you at some point in your web development.