Posts

Showing posts with the label Internet

Sessions and Cookies

Image
One very important concept that all Web-Developers must know of is Sessions . Now most of us may already be familiar with the term, but read on to know what is it exactly and why do we need them so much. Let's start off by understanding a little bit about HTTP requests. But before that please make sure you have an Idea of Servers, Clients, and Browsers . An HTTP request is made by your browser whenever you connect to a Website or a Web-app. Whenever an HTTP request is made by the browser the following happens: An HTTP connection is opened. A URL, headers, and request body (if required) are sent. The server responds with an HTTP response: status_code, headers and response body. The HTTP connection is closed. Now, this format has a problem. That is HTTP is a stateless protocol.  That is One HTTP request made by the browser actually has nothing to do with any other HTTP request. From the server’s point of view, all HTTP requests are completely independent. The problem i...

IP addresses, Domain names and DNS

Did you know that all you ever need to connect to any computer in the world via the internet is its IP address?  That's right if you have the IP address of any computer you can send an HTTP-request(or an FTP request) to that computer. Whether to respond to the request or not is completely up to that computer. An  IP address  is short for Internet Protocol address. There are two versions of IP addresses the 32-bit IPv4 and 128-bit IPv6. The internet currently uses the IPv4 address which is a combination of four numbers each can range from 0 to 255, for example, 139.59.79.235 However remembering these IP addresses to connect to every website is difficult. That is why 99% of websites have a Domain Name , which is normally used by you to connect to their website. These Domain Names are an alternative to IP addresses that are easy to remember. You need an IP address to get to any website(Server) on the internet . However, you almost never type in the IP address of an...