Lasso Soft Inc. > Home

[ client_contenttype ]


[Client_ContentType] returns the MIME type requested by the current HTTP request. The MIME type is used by the Web server to determine what type of file to return. Common MIME types include 'image/gif' or 'image/jpeg' for image files.

Note: This tag is reliant on the information which is sent from the Web server with each page request. Most Web servers do not send along content type information for text types such as 'text/plain', 'text/html', or 'text/xml'. In these cases this method will return nothing.

[Client_ContentType] is provided as backwards compatibility. For new Lasso 9 projects it we recommended using [web_request->contentType]

  • Syntax
  • Beginner

To return different content based on the requested MIME type:

Use the [Client_ContentType] method to determine the type of content that was requested. The following example includes either an JPEG image or GIF image depending on what MIME type was requested.


if(Client_ContentType >> 'jpg')
else(Client_ContentType >> 'gif')

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft