Common Mistakes When Submitting a URL or Creating a Reference in your Code

By reference in your code, I mean any of the following:

  1. The URL or reference begins with "file://" or the word "Desktop" or "Downloads" appears in the URL- This is a reference to other files on your computer; it will not work when the files are uploaded to a server because the server will not have access to your computer. Think about it, would you want a program running on some server to be able to access files on your computer? Or what happens if your computer is turned off, or it doesn't have an internet connection. Your website would not work.

  2. The URL or reference refers to a drive such as the C:, D:, E:. etc. drive - This is a reference to files on your computer or a flash drive; it will not work when the files are uploaded to a server because the server will not have access to your computer, or would you want it to have access, or your computer could be off..

  3.  If you are using the NVCC myDrive system, a URL like https://mydrive.nvcc.edu/public/folder/U6XjQLVfYkyvwlMbUmH04w/myself instead of soemthing of the form http://MyDrive.nvcc.edu/username/public. If you specify the one with the long string of letters and numbers, it does provides access to your files but the access will look like

    My Drive files
    If one try to open up one of the html files, one will see the source code; it will not bring it up in the browser.

    The myDrive instructions state as follows:

    "Please Note:

    This system provides you with the ability to easily share documents and files with others. If you are developing web applications for a class, you must use the following URL format in order for your web applications to perform properly:

    http://MyDrive.nvcc.edu/username/public

  4. A URL or reference beginning with ftp:// - ftp stands for file transfer protocol. It is the protocol by which you upload files to your server space and download files from your server space. Because you don't just anyone to be able to upload files to your server space, ftp requires a username and password. FTP is almost always done without a browser. When you provide a URL to someone, you want them to be able to view your web pages in a browser without a username and password. They will be accessing your pages through the http or https protocol.

  5. (Less commonly) A reference that begins with several ../ - The ../ means move up a level in the directory structure and repeating this means move up multiple levels in a directory structure - This can be a valid reference on your computer and when the file is present on the server. However, it will not work if moving up the required number of levels on the server would take the user out of the website.


    Revised: February 20, 2018. Comments to William Pegram, wpegram@nvcc.edu