web application – Programmerbay https://programmerbay.com A Tech Bay for Tech Savvy Tue, 06 Oct 2020 17:02:56 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://programmerbay.com/wp-content/uploads/2019/09/cropped-without-transparent-32x32.jpg web application – Programmerbay https://programmerbay.com 32 32 Difference between Cookies and Session in Tabular form https://programmerbay.com/difference-between-cookies-and-sessions/ https://programmerbay.com/difference-between-cookies-and-sessions/#respond Mon, 09 Mar 2020 19:31:22 +0000 https://www.programmerbay.com/?p=2789 Cookies and Session are used to make a stateful communication between client’s system and server, or it can be between computers.

Difference between Cookies and Sessions

When a client sends a request to a server, an HTTP request is created with a header consisting of information about the user and requested page.

In a similar way, when the server provides the appropriate page back to the client, an HTTP response is generated with a header having information about the document being sent.

In an all, HTTP protocol is used for communicating on the web.

This HTTP protocol is stateless and to make it stateful, we use Cookies and Session.

Difference between Cookies and Session in Tabular form

CookiesSession
It is a small piece of information which is sent by the server on the client's machine to identify a user uniquelyIt is a set of data that is stored on a server
It expires after a specific length of timeIt expires as and when the browser is closed
It is not secured as one can read values and may alter them directly by accessing and reading it from browserIt is more secure as it is managed and stored at server-side
The size of the cookie is limited to 4 kbThe storage capacity of Session is comparatively more than cookies
A user can disable cookiesA user can't disable session

Session

A session is used to provide stateful communication between client and server. It maintains the state by storing the information at the server side.

It assigns a unique session ID to every user at first visit on the website and the same session id is saved at the client’s machine in the cookies.

Cookie

At the client level, Cookies are the small piece of information which is sent by the server to identify the user and its activities uniquely.

In this method, the information is stored locally on the user’s browser and later on, this information is then being sent to the server whenever the information is needed ( when the user again visits that site).

How do cookies and session work?

When a client’s computer requests a webpage from a server ( a Website), in return, the server answers back with the requested webpage. This is how client/server approach works.

However, it is crucial to keep information about users in order to monitor the behavior carried out by them on various webpages. This can be done by maintaining state.

As it helps in the further development of complex interactive web-based applications.

If a server isn’t capable of maintaining the state then it would forget all the information about a visitor and the page on which he landed on, as and when it responded.

To overcome this problem, this type of information is stored on the server itself or the user’s browser locally. One of the way is cookie and session.

 

]]>
https://programmerbay.com/difference-between-cookies-and-sessions/feed/ 0
Difference between HTML and XML https://programmerbay.com/difference-between-html-and-xml/ https://programmerbay.com/difference-between-html-and-xml/#respond Sun, 01 Sep 2019 09:00:08 +0000 https://www.programmerbay.com/?p=4874 HTML and XML both have different purposes to serve, one is used for presenting  data and other one is used for transferring data. Lets see how these two are different from each other.

Difference between HTML and XML in Tabular form

HTMLXML
Stands for Hypertext mark–up LanguageStands for eXtensible mark–up Language
It is a predefined languageIt provides a credible framework for defining the mark – up language
It does not contain any kind of structural informationIt contains the structural information
The purpose of this mark–up language is to effectively represent the dataThe purpose of this mark–up language is to have an efficient transfer of information
No preservation of the white spacesWhite spaces can be preserved
It allows to have both paired and non-paired tagsIt allows only paired tags
It is not case sensitiveIt is case sensitive

HTML

The mark–up language which is used for creating webpages is called HTML. It employs TAGS which help in constructing and presenting the layout of the webpage. All the HTML elements are evaluated and run on the browser and present it over the screen.

XML

The mark – up language which helps the user to calibrate data representation or the structure of data in which each and every detail is assigned. This XML mark–up language can be used to create user-defined tags and user-defined mark–up language. The XML focuses on the fact that how the data is stored.

Key Differences

  • FULL FORM

HTML stands for Hypertext mark–up Language; whereas; XML stands for eXtensible mark–up Language.

  • GENERAL

HTML language is an already predefined language; whereas; when we talk about the XML language then, the XML language provides a credible framework for defining the mark – up languages.

  • STRUCTURAL INFORMATION

In case of the HTML language, this mark – up language does not contain any kind of structural information, whereas; in case of XML language then, this mark – up language always contain the structural information.

  • LANGUAGE PURPOSE

When we consider the HTML language, the purpose of this mark–up language is to effectively represent the data; whereas; when we consider the XML language, the purpose of this mark–up language is to have an efficient transfer of information.

  • WHITE SPACE PRESERVATION

In the HTML language there is no preservation of the white spaces as such; whereas; when we talk about the XML language then, in the XML language the white spaces can be preserved.

  • CLOSING TAGS

In case of the HTML language, it has an optional approach towards them as, some tags can also work without closing tags; whereas; in case of the XML language, it has a compulsory approach towards them as every tag is required to have a closing tag.

  • NESTING

When we consider the HTML language then, the nesting has no valuable effect on the HTML code, so there is no need for it; whereas; when we consider the XML language then, the nesting has a great value in the XML code, so it must be properly done.

]]>
https://programmerbay.com/difference-between-html-and-xml/feed/ 0