The Content-Type Header Explained (with examples) | Web Development Tutorial

Publicado em: 31 Agosto 2018
no canal de: dcode
52,423
544

In this video we take a look at the Content-Type header part of the HTTP protocol. In a nutshell, the Content-Type header indicates what kind of data (MIME Type) is being sent.

As an example, we'll be setting the Content-Type as "application/json" in a PHP script which returns a JSON string. We then use a similar technique to output CSS without creating a ".css" file.

The Content-Type should be used to make your server-side code "proper". It also allows you to create dynamic resources (i.e. images, style sheets, JavaScript etc.)

Support me on Patreon:
  / dcode   - with enough funding I plan to develop a website of some sort with a new developer experience!

For your reference, check this out:
https://developer.mozilla.org/en-US/d...

Follow me on Twitter @dcode!

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!


Nesta página do site você pode assistir ao vídeo on-line The Content-Type Header Explained (with examples) | Web Development Tutorial duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário dcode 31 Agosto 2018, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 52,423 vezes e gostou 544 espectadores. Boa visualização!