Any web developer out there has their favorite FTP program as a major part of their web development arsenal. Whether it be FireFTP, CuteFTP, WS_FTP, Filezilla, SmartFTP or any other FTP program, they all have a setting that allows you to set how you wish to transfer your files.

What is Transfer Mode
Transfer mode is the method in which you wish to send your data to your server. Options are either ASCII, binary or automatic. (Binary in this case does not exactly refer to 1′s and 0′s). I’m sure 99% of users will have their transfer mode set to either binary or Automatic. Myself, I have it set to automatic, but do you actually know what the difference between ASCII and Binary is?

FTP Transfer Mode - ASCII or Binary?

I’ll spare you the technical details but here’s the general rule:

  • If you can open the file in Notepad and understand it, then transfer the file using ASCII mode.
  • If it’s a bunch of random unintelligible characters in Notepad, then transfer the file using binary mode.

For a more technical explanation of the difference between the two, check out good ol’ Wikipedia: binary and ASCII.

Why is this Important?
If you transfer a binary file with ASCII mode, you will corrupt the file. Go ahead, try transferring an image with ASCII mode and see if it’ll display properly! Luckily, the reverse isn’t true. If you transfer an ASCII file (like an html file) as binary, most but not all systems and software these days will not corrupt your ASCII file. However, to be safe, it may be better to set your FTP transfer option to “Automatic”.

In most cases, setting it to Automatic will transfer files with certain extensions as ASCII (i.e. txt, php, html, css, js, java, etc.). But as more languages and frameworks come out, more and more extensions should be transferred as ASCII so it’s important to keep your FTP software up to date!

Some FTP software as I understand actually looks into the file to detect if the contents are ASCII or binary. I couldn’t tell you which ones but I know FireFTP uses the less effective extension detection method.

Extension Confusion
With the increasing amount of file types out there, certain extensions are bound to be repeated. So eventually (if there isn’t already), there will be an extension that is used in both ASCII and binary formats so you’ll need to be careful which transfer mode you upload it with!

Popularity: 3% [?]

Leave a Reply