Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There seems to be some confusion about the script tags and html comments. A client side VBScript tag would look like this:</p> <pre><code>&lt;script type="text/vbscript"&gt; ... &lt;/script&gt; </code></pre> <p>Or with the older (deprecated) language attribute:</p> <pre><code>&lt;script language="VBScript"&gt; ... &lt;/script&gt; </code></pre> <p>That is the only type of VBScript that would ever reach the client, provided of course that you put it in an <code>.asp</code> page. If you put it in an <code>.html</code> page it will be sent as is to the client without running it through the script engine on the server.</p> <p>A server side VBScript tag would look like this:</p> <pre><code>&lt;script runat="server"&gt; ... &lt;/script&gt; </code></pre> <p>Or the short form:</p> <pre><code>&lt;% ... %&gt; </code></pre> <p>If you have correct server side script tags in an <code>.asp</code> page, the code inside will never be visible to the client.</p> <p>An HTML comment looks like this:</p> <pre><code>&lt;!-- ... --&gt; </code></pre> <p>Notice that the hyphens is a part of the HTML comment. The two hyphens at the start turns on the comment mode, and the two hyphens at the end turns off the comment mode. If you have another two hyphens inside the comment, it's broken and is rendered on the page:</p> <pre><code>&lt;!-- This is not -- a comment --&gt; </code></pre> <p>However, if you put another pair of hyphens in to turn the comment mode on again, it's a valid comment:</p> <pre><code>&lt;!-- This is -- -- a comment --&gt; </code></pre> <p>HTML comments are sometimes used inside script tags, for some historical reason that browsers that doesn't support script should not display the code on the page. This is not needed any more as all browsers nowadays understand the script tag even if they don't run the script. The risk of someone having a 20 year old browser is pretty slim.</p> <p>If you had a script tag with HTML comments in them, and both the script tag and HTML comment would be broken, it could show up in the browser. Like this:</p> <pre><code>&lt;scrpt type="text/javascript"&gt; &lt;!-- var i = 1; i--; //--&gt; &lt;/script&gt; </code></pre> <p>Notice that the -- operator in the script is breaking the comment. If the script tag is not broken, it's however not a problem. The browser will not treat the comment inside the script as a real comment, so it doesn't matter that it's broken.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload