Browsers, Servers, and HTML file: [browser_server_2015.doc, last updated June 4, 2015]
In our Wednesday, May 27 class I was not satisfied with my attempt to explain how the web browser/server interaction works and how that relates to:
· The various ways to create web page
· The various internet based resources related to creating web page.
This is intended to help.
The two main players in this game are
· the browser program running on you home computer (Internet Explorer, Chrome, Firefox, Safari)
· The remote internet server where the HTML file related to a web page is stored.
When a browser uses an URL (universal resource locator) like:
http://boppers.net/prog/index.HTML
to view a web page, the process consists of the browser contacting the appropriate server and asking it to send the HTML file across the internet to the browser.
The browser receives the HTML file and processes it to produce the web page it displays in the browser window. Though very few people have any reason to do this, browsers also permit users to view the HTML code in text form. The HTML file is a text document, just like a Python program is a text document.
This can be a little confusing. An HTML document is a text document that a browser uses to create a the web site that nearly all users see. There are two ways to view this document:
1. As one or more web pages that appear the way the creator wants them seen when a user enters the appropriate URL. (that’s what we normally see when we are surfing the web)
2. As a text document that uses appropriate codes to tell a web browser what to display when its URL is entered. For example the HTML code below display “Hello” in bold on a web page.
<b>Hello</b>
So there are two ways to view a web page. One is the way the creator wants end users to view it, and this is the way it is almost always seen. The other is the way someone who knows HTML can view the ASCII text containing the HTML code for that page.
Keep in mind that the web page related to an HTML file cannot be viewed on the internet (using a URL), until it is stored appropriately on an internet server. However, an HTML file stored on a local computer can be viewed as a web page on the local computer by opening it with a browser (ctrl-o on some browsers) on that same computer.
Though an HTML file cannot be viewed across the internet until it is transferred to a server, it can be created on a home computer first, and then transferred to a server. Alternatively, you could have used an on-line program to create the HTML file and save it directly on a remote server. So there are two locations where an HTML file can be created:
1. On a the local machine being used by the web site creator
2. On a remote server connected to across the internet by a browser running on the creator’s local machine. The browser is communicating with a program on the server that is creating the html file/web site.
There are two common ways to create an HTML file:
1. Using a text editor (like notepad++) to type in the appropriate text for HTML code.
2. Using a WYSIWYG (What You See Is What You Get) HTML editor that allows the user to work on the web page while viewing what a browser would display when it interprets that page.
This can be confusing. Here is a paragraph that summarizes the above explanations:
An HTML file can be viewed as a web page/site or as an ASCII text file. An HTML file can be viewed when stored on the same machine as the browser that views it, or when it is stored on a remote web server. An HTML file can be created, and edited on the developer’s local machine and later transferred to a remote web server. Alternatively a web developer can use on-line software to create a web page on a remote computer and then save it to an internet server. Finally, an HTML file can be created and edited, using a text editor or a WYSIWYG web site editor. If you can wrap your mind around all of these possibilities, you are doing well. It’s messy.
Let’s look at few examples of web page development:
I normally create my HTML files on my local computer using a commercial WYSIWYG HTML editor called Dreamweaver. It costs around $300. I can also view and edit the underlying ASCII text containing the HTML code for the page I am developing. There are free WYSIWYG HTML editors that can be downloaded form the internet and used on a local machine. I recently downloaded and worked with one called “KompoZer” and my initial impression is that it is a fairly well designed and easy to use application. Users still have to learn quite a bit, but it’s no harder than it needs to be.
I recently worked with a young woman who develops web pages using a text editor. I assume that she does this on her personal computer.
She and I can both develop web pages and view them as either (a) web pages an internet user would see or (b) Ascii text HTML code. However, they will not be available on the internet (i.e accessible via an URL), until we transfer them to a server. I use a small ISP (Internet Server Provider) called Svaha. There are several large ISPs that will “host” web sites for as little as a few dollars per month (e.g Dotster). I use a file transfer program (FTP) called Filezilla to connect to the Svaha server and transfer my HTML files to the appropriate location. Filezilla is free and has worked well for me for several years.
Seniors majoring in education at Emory & Henry are required to make a presentation summarizing the high-points of their internship, and related learning, before graduating. Most of them choose to do this by creating a web site show casing their work. They use a free on-line service called “Weebly” to do this. Though Weebly would (I assume) permit users to upload HTML file, I think that is rare. The education majors would prefer not to have to learn HTML, or how to use something like Filezilla. Instead, they use the tools provided to them on-line by Weebly to construct their web sites.
Weebly, and some competing services, permit users to create web sites, accessible on the internet, at no cost. However, the URL used for that site will have the name “weebly” in it.
If someone wants to have a unique URL such as “barnold.org”, they will have to pay an annual fee (currently around $12) to do so. They can only use that URL if no-one else is already using it.
If you want to have your own website on the internet, there are three things that will, or could, cost you money:
· A unique domain name could cost around $12/year. You can get a free one if you are willing to let your website be a branch of another website, like Weebly.
· A ISP (internet service provider) will need to be paid to “host” your web site. Individuals can set up their own web servers and use it on the internet from their home. This does not require the knowledge and skill of a full time professional techie. Many amature hackers (in the good sense of the word), including high-school students have done this. I have done it and may do it again soon.
· There are a number of on-line services available to assist you in creating and maintaining your website. You would do this using a browser to connect to their web development/editing software. Some charge a monthly fee, some (like Weebly) don’t.
Some on-line services will combine all three of these services for a monthly fee.
I hope this makes this area at least a little less confusing.
The next thing I would like to explain is how the JavaScript language relates to an HTML file and why it is especially appropriate for creating applications that will be used on the internet. The main take-aways from the document I intend to write are:
· JavaScript permits writing a program that is stored with the HTML file. This means that a programmer can put a program in a web page such that anyone accessing that web page can run that program. This is very good way to make a program available to many users.
· JavaScript programs are run by the browser running on the local machine. This means that the internet server where the HTML file and related JavaScript program are stored does not have to use its resources to run the program. Large multi-user programs, like “World of Warcraft” use a combination of JavaScript and programs running on the server. There is a strong incentive to keep as much of the computer processing on the browser machine as possible.
I will also discuss my understanding that JavaScript is one of the better, and more popular, programming languages in use today. There are many libraries of well developed code that can be used when building an application as well as numerous tools (such debuggers, graphic editors etc.) available. JavaScript, like other major programming languages, has a lot of on-line support of all kinds.
Click here to see a very brief introduction to HTML and some examples of it's use.