What is Output Buffering in PHP, It’s Advantage and Usage

What is Output Buffering

PHP sends data to your web browser as soon as it is ready – this might be line by line or in chunks. It makes your webpage slow and you have to maintain the order in which the data need to be sent. What Output buffering do is, It stores the data in buffer. It returns the data to the browser when buffer is flush. When buffer is flush then all the data is sent at once instead of chunks.

PHP Cookies – How to Create, Set, Read & Delete a Cookie in PHP

PHP Cookies – How to set, read and delete a cookie in PHP?

HTTP is a stateless protocol. It means user sends a request, a server responds to that request without remembering the request later. To track important information (such as user preference, user activity etc.) on a website cookies are very useful. In this blog post, You are going to learn what is a cookie and How to create, set, read and delete a cookie in PHP.

What is Cookie?

Cookies are very useful to store small information in a remote browser (user browser). It’s a simple text file which stores maximum 4KB of data.

Cookies are created by a browser on the request of a server (as per program logic). Once a cookie is created on a user browser, the browser sends that cookie information back to the server using HTTP Header.