Difference between revisions of "CONTENT TYPE HTML"
Jump to navigation
Jump to search
Kireji Haiku (talk | contribs) (Created page with "<onlyinclude>{{#vardefine:CONTENT_TYPE_HTML|{{LSL Const|CONTENT_TYPE_HTML|integer|ihex=1|hex=0x1|c={{#if:{{{direct|}}}|Sets the content type of a llHTTPResponse to <code>{{St…") |
Kireji Haiku (talk | contribs) m (added link to HTML_HUD_Demo) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude>{{#vardefine:CONTENT_TYPE_HTML|{{LSL Const|CONTENT_TYPE_HTML|integer| | <onlyinclude>{{#vardefine:CONTENT_TYPE_HTML|{{LSL Const|CONTENT_TYPE_HTML|integer|1|c={{#if:{{{direct|}}}|Sets the {{Wikipedia|Internet media type|Internet media type}} <code>{{String|Content-Type}}</code> header of any subsequent [[LSL HTTP server]] response via [[llHTTPResponse]] to <code>{{String|text/html}}</code>.}}}}}}</onlyinclude>{{LSL Constant | ||
|name={{#var:cname}} | |name={{#var:cname}} | ||
|type={{#var:type}} | |type={{#var:type}} | ||
|value=1 | |value=1 | ||
|desc=Sets the | |desc=Sets the {{Wikipedia|Internet media type|Internet media type}} <code>{{String|Content-Type}}</code> header of any subsequent [[LSL HTTP server]] response via [[llHTTPResponse]] to <code>{{String|text/html}}</code>. | ||
|comment={{#var:comment}} | |comment={{#var:comment}} | ||
|caveats= | |||
* When using [[CONTENT_TYPE_HTML]], this setting will be ignored unless all of these conditions are met: | |||
*# the web browser is the Second Life client | |||
*# the user (logged into the SL client viewing the page) is the owner of the object. | |||
*# the user (logged into the SL client viewing the page) is connected to the region the object is located in | |||
*: Obviously this is not compatible with group owned objects. One way around this limitation would be to [[llAttachToAvatarTemp|temporarily attach]] a repeated. | |||
|examples= | |examples= | ||
|constants= | |constants= | ||
Line 20: | Line 25: | ||
{{LSL DefineRow||[[llHTTPResponse]]|}} | {{LSL DefineRow||[[llHTTPResponse]]|}} | ||
|events= | |events= | ||
{{LSL DefineRow||[[http_request]]|}} | |||
{{LSL DefineRow||[[http_response]]|}} | {{LSL DefineRow||[[http_response]]|}} | ||
|articles= | |||
{{LSL DefineRow||[[LSL HTTP server]]}} | |||
{{LSL DefineRow||[[HTML HUD Demo]]}} | |||
|cat1=Chat | |cat1=Chat | ||
|cat2 | |cat2 |
Latest revision as of 06:03, 8 January 2014
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Description
Constant: integer CONTENT_TYPE_HTML = 1;The integer constant CONTENT_TYPE_HTML has the value 1
Sets the Internet media type "Content-Type"
header of any subsequent LSL HTTP server response via llHTTPResponse to "text/html"
.
Caveats
- When using CONTENT_TYPE_HTML, this setting will be ignored unless all of these conditions are met:
- the web browser is the Second Life client
- the user (logged into the SL client viewing the page) is the owner of the object.
- the user (logged into the SL client viewing the page) is connected to the region the object is located in
- Obviously this is not compatible with group owned objects. One way around this limitation would be to temporarily attach a repeated.
Related Articles
Constants
• | CONTENT_TYPE_TEXT | |||
• | CONTENT_TYPE_XML | |||
• | CONTENT_TYPE_XHTML | |||
• | CONTENT_TYPE_ATOM | |||
• | CONTENT_TYPE_JSON | |||
• | CONTENT_TYPE_LLSD | |||
• | CONTENT_TYPE_FORM | |||
• | CONTENT_TYPE_RSS |
Functions
• | llSetContentType | |||
• | llHTTPResponse |
Events
• | http_request | |||
• | http_response |
Articles
• | LSL HTTP server | |||
• | HTML HUD Demo |