What type of headers does PHP support?

What type of headers does PHP support?

A header is used to talk between a browser and a server. The primary function of a header() function is to send a  raw HTTP header to a client. However, it should be noted that a header() must be called before any actual output is sent.

In that regard, PHP supports the following header:

  • header() – sends HTTP response headers
  • Location header – redirects the browser
  • Refresh header – adds a delay before  redirecting the browser
  • Content-Type header – tells the browser what type of data the server is about to send

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.