HFS: Tipi MIME: Difference between revisions

From rejetto wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Cos'è un tipo MIME ? ==
== Cos'è un tipo MIME ? ==


A ''MIME type'' is effectively information describing the kind of document retrieved from the web server. Since a web server can furnish many types of documents, the browser needs a way to know the specific document type in order to display it properly.
Un tipo ''MIME'' è, in effetti, un'informazione che descrive il tipo di documento inviato dal web server.<br>Poichè un web server può fornire vari tipi di documento, il tuo browser necessita di un sistema per conoscere lo specifico tipo di documento prima di poterlo visualizzare.


== Non è sufficiente l'estensione del file ? ==
== Non è sufficiente l'estensione del file ? ==


Sometimes file extension is not enough. For example, In the web environment, when a PHP script generates a jpeg image, you get an URL with a ''.php'' extension. However, the browser knows that the content represents a jpeg image because it gets this information in the http header as a ''MIME type''.
A volte, l'estensione del file non è abbastanza.<br>Per esempio, quando uno script PHP genera un'immagine jpeg, sarai collegato a una URL con l'estensione ''.php''.<br>Tuttavia, il browser conosce che questo contenuto rappresenta un'immagine jpeg perchè prende questa informazione dall'header  http come tipo ''MIME'' jpeg.

Latest revision as of 21:12, 7 January 2007

Cos'è un tipo MIME ?

Un tipo MIME è, in effetti, un'informazione che descrive il tipo di documento inviato dal web server.
Poichè un web server può fornire vari tipi di documento, il tuo browser necessita di un sistema per conoscere lo specifico tipo di documento prima di poterlo visualizzare.

Non è sufficiente l'estensione del file ?

A volte, l'estensione del file non è abbastanza.
Per esempio, quando uno script PHP genera un'immagine jpeg, sarai collegato a una URL con l'estensione .php.
Tuttavia, il browser conosce che questo contenuto rappresenta un'immagine jpeg perchè prende questa informazione dall'header http come tipo MIME jpeg.