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 tag will return nothing.

  • Syntax
  • Parameters
[Client_ContentType]
Examples

To return different content based on the requested MIME type:

Use the [Client_ContentType] tag 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']
  [Include: 'image_jpg.lasso']
[Else: (Client_ContentType) >> 'gif']
  [Include: 'image_gif.lasso']
[/If]
Tag Link [Client_ContentType] Category Client
Type Substitution Data Source Any
Support Preferred Version 5.0
Output Type String Security None
Implementation Sets Lasso 5.0

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