Link | json_header |
Author | Jonathan Guthrie |
Category | Utility |
Version | 9.x |
License | Public Domain |
Posted | 23 Mar 2013 |
Updated | 23 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.
json_header
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) else web_response->replaceHeader('Content-Type'='application/json; charset=' + http_document->encoding) } }
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft