![]() |
| Host Servers |
- HTTP
- Cookies
- JSP
HTTP at the server side
If you read my very first blog post, you will remember that I wrote:
"Web clients (such as Web Browsers) and Web Servers communicate together via HTTP requests & responses and in order to do this, both must abide to the rules stated in this protocol"
This means that HTTP is not an actual server-side technology, but a protocol which dictates how communication takes place between clients and servers.
But how is this protocol enforced and where?
The answer to this question is, HTTP is enforced on both sides of the communication channel via the client's web browser and the server's hosting application. Now, ever one of you know what a web browser is, if not you wouldn't be viewing this blog, but what about this server-side hosting application? Well it's actually called a Web Server and there are multiple different brands of it. The first two that come to mind and probably the most popular are Apache HTTP Server and Microsoft's IIS (Internet Information Sever).
These web servers listen out for HTTP requests, locate the requested information and reply back to the requesting client via an HTTP response. The diagram below illustrates this process.
![]() |
| HTTP Request / Response cycle |
Keep in mind that this is a very simplified definition on what web servers do, to know more about this topic visit this article at the HowStuffWorks website.
Cookies
![]() |
| The importance of HTTP cookies |
No...not the kind you're thinking about! These cookies are not edible unfortunately, but they are very important building blocks of the internet.
Cookies are small files, stored on the client's machine and are used to store some information about the client, in order for the web server to produce and return a web page tailored for a particular user.
But why does it have to be this way?
Well the reason is, HTTP is stateless, meaning the web server cannot identify a client from the HTTP request it receives, therefore if a client machine sends a request to the web server and after receiving the response, sends another request, the web server has no idea that the second request is from the same client. This limitation would make it quite difficult for you to log into you personal Gmail account or any other internet account for example. The Internet would also loose that certain experience attributed to personalisations as it would not know who you are.
This is where cookies come in handy, as web developers can assign a number for example to every user that visits a site and store it in a cookie on the user's machine. This cookie is then sent with the client's HTTP request and the web server uses it to identify that client.
JSP (Java Server Pages)
JSP is a server-side technology which was first released in June 1999 by the JSP group which was led by Larry Cable and Eduardo Pelegri-Llopart, for more history on JSP visit raible designs.
JSP enables dynamic creation of web pages by embedding Java code in; HTML, XML, DHTML and other file types. What basically happens is, when a client sends an HTTP request to the web server the Java code stored in lets say an HTML file gets executed on the server which generates HTML code according to some passed parameters or query result and returns it to the client machine.
What If?
As you might already know, many non-technical internet users think that cookies is some sort of malicious software trying to steel their personal information and identity. This is obviously not the case, but this fear might erupt from the fact that the information which identifies the user is sent to the web server along with the HTTP request.
So I was thinking, if JavaScript works on the client side and cookies are stored on the client side as well, one could possibly eliminate or drastically reduce the sending of cookie files to the web server, as their data could be accessed by JavaScript and use AJAX technology to retrieve stored data from the server.
This way cookie files will remain always on the client side and end the myth among non-technical people that cookies are a bad thing.
JSP is a server-side technology which was first released in June 1999 by the JSP group which was led by Larry Cable and Eduardo Pelegri-Llopart, for more history on JSP visit raible designs.
JSP enables dynamic creation of web pages by embedding Java code in; HTML, XML, DHTML and other file types. What basically happens is, when a client sends an HTTP request to the web server the Java code stored in lets say an HTML file gets executed on the server which generates HTML code according to some passed parameters or query result and returns it to the client machine.
What If?
As you might already know, many non-technical internet users think that cookies is some sort of malicious software trying to steel their personal information and identity. This is obviously not the case, but this fear might erupt from the fact that the information which identifies the user is sent to the web server along with the HTTP request.
So I was thinking, if JavaScript works on the client side and cookies are stored on the client side as well, one could possibly eliminate or drastically reduce the sending of cookie files to the web server, as their data could be accessed by JavaScript and use AJAX technology to retrieve stored data from the server.
This way cookie files will remain always on the client side and end the myth among non-technical people that cookies are a bad thing.



No comments:
Post a Comment