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

Publicado el: 31 agosto 2018
en el 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!


En esta página del sitio puede ver el video en línea The Content-Type Header Explained (with examples) | Web Development Tutorial de Duración hora minuto segunda en buena calidad , que subió el usuario dcode 31 agosto 2018, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 52,423 veces y le gustó 544 a los espectadores. Disfruta viendo!