Lasso Soft Inc. > Home


AuthorJonathan Guthrie
LicensePublic Domain
Posted23 Mar 2013
Updated23 Mar 2013
More by this author...


json_header is a method that overcomes MSIE's issue with needing a different MIME type than the rest of the universe.

Sample Usage


Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

/* ==================================
   Sets headers for JSON content
   provides the fix for MSIE not handling JSON content types correctly
   - Thanks to Steffan Cline for pointing this out
==================================	*/

define json_header() => {
   if(web_request->httpUserAgent >> 'MSIE') => {
      web_response->replaceHeader('Content-Type'='text/javascript; charset=' + http_document->encoding)
      web_response->replaceHeader('Content-Type'='application/json; charset=' + http_document->encoding)


No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home



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