I just ran across a html page which has some scripts. The script tag starts with the following line:
<script type="text/IMAN">
my question is what is a IMAN script?
I know javascript usually starts with <script type="text/javascript">
I changed to , now the page shows all the code.
Giving a browser a mime type that it doesn't understand is a great way tell it to ignore your code...allowing you to store code snippets for later - this is most commonly used in templating like https://github.com/janl/mustache.js. Here is how it is used to store content:
<script type="text/template" id="template">
<div>this is my hidden content for a popup</div>
</script>
var content = $('#template').html();
$('#popup').html(content).show();
You can specify any valid MIME type (which basically just means "two identifiers separated by a slash") for the script type and the browser will ignore the content, if it doesn't recognize the type. Likely it's an HTML template or something else that the developer wants to access from Javascript but wants the browser itself to ignore. The IMAN name? Probably some injoke by the programmer.
In jQuery (for example), you could access it like:
$("script[type*=IMAN]").each(function()
{
// Do something with $(this).text() or .html() or whatever
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With