Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've tried all the suggestions I could find for this, including the answers to this question, but none worked. <a href="https://stackoverflow.com/a/3613883/1879673">Kau-Boy's answer to this question</a> didn't work for me (as it comments out both the meta tag and most of the second code script block, then js breaks on <code>');</code> which it tries to interpret after the comment is closed i.e. this happens:</p> <pre><code>&lt;script type="text/javascript"&gt; document.write("&lt;!-- "); &lt;/script&gt; &lt;!-- &lt;meta http-equiv="Refresh" content="2;URL=js.html" /&gt;&lt;script type="text/javascript"&gt; document.write(' --&gt; &lt;script type="text/javascript"&gt; '); &lt;/script&gt; </code></pre> <p>I took inspiration though from what it <em>did</em> do, and put together the following which seems to work:</p> <pre><code>&lt;script type="text/javascript"&gt; document.write('\x3Cscript type="text/javascript"&gt;/*'); &lt;/script&gt; &lt;meta http-equiv="Refresh" content="0;URL=js.html" /&gt; &lt;script type="text/javascript"&gt;/**/&lt;/script&gt; </code></pre> <p>Essentially, if javascript is enabled, we get 3 script elements, one of which is the meta tag tricked inside a javascript comment, so it doesn't redirect. If javascript is disabled, all it sees is two script elements which it ignores, and the unmolested meta element, so it redirects.</p> <p>Note: if you serve up your page with application/xhtml+xml content type (which you probably should be doing, I suppose, if the document is xhtml), this will break js in the browser, since the write method will usually be disabled.</p>
    singulars
    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.
    3. 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