[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]
Client_ContentType
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.
Code
if(Client_ContentType >> 'jpg')
include('image_jpg.lasso')
else(Client_ContentType >> 'gif')
include('image_gif.lasso')
/if
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 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments