Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

634 LESSON 23: How to Publish Your Site


n Watch out for uppercase or lowercase sensitivity— Filenames on computers run-
ning Microsoft Windows are not case sensitive. On UNIX and Mac OS X systems,
they are. If you develop your pages on a computer running Windows and publish
them on a server that has case-sensitive filenames, make sure that you have entered
the URLs in your links properly. If you’re linking to a file named About.html, on
your computer running Windows, about.html would work, but on a UNIX server
it would not. It’s best to get in the habit of using all lowercase letters for file and
directory names on your web pages.
n Be aware of carriage returns and line feeds— Different systems use different
methods for ending a line. The Macintosh uses carriage returns, UNIX and Linux
use line feeds, and DOS and Windows use both. When you move files from one
system to another, most of the time the end-of-line characters will be converted
appropriately, but sometimes they won’t. The characters that aren’t converted can
cause your file to come out double spaced or all on a single line when it’s moved to
another system.
Most of the time, this failure to convert doesn’t matter because browsers ignore spuri-
ous returns or line feeds in your HTML files. The existence or absence of either one
isn’t terribly important. However, it might be an issue in sections of text that you’ve
marked up with <pre>; you might find that your well-formatted text that worked so
well on one platform doesn’t come out that way after it’s been moved.
If you do have end-of-line problems, you have two options. Many text editors
enable you to save ASCII files in a format for another platform. If you know the
platform to which you’re moving, you can prepare your files for that platform
before moving them. If you don’t know, save your file to a UNIX or Linux format.

Uploading Your Files
In the preceding list of tips about moving files, I mentioned FTP. FTP, short for File
Transfer Protocol, is one of the ways to move files from your local computer to the
server where they will be published, or to download them so that you can work on them,
for that matter. Some other protocols that can be used to transfer files include SFTP
(Secure FTP) and SCP (Secure Copy). They all work a bit differently; the most important
difference is that SCP and SFTP are encrypted, whereas FTP is not.

If your server provides multiple methods for uploading files,
you should choose SCP or SFTP rather than FTP. With FTP, your
password for the server will be transmitted unencrypted over
the Internet. That’s a security risk. It’s preferable to use the
encrypted uploading options. And many hosting providers are
switching to only secure transfer methods.

TIP
Free download pdf