noscript

noscript 要素 (HTML)

noscript 要素型 (HTML, XHTML 1)

[1] HTMLnoscript 要素型の要素は、 スクリプトが実行されないときの代替内容を提供します。

[9] 仕様書:

[8]

状態
W3C 勧告
名前空間URI
http://www.w3.org/1999/xhtml
局所名
noscript (script (スクリプト) の否定 (未対応 / 未実行) より)
開始タグ
必須
終了タグ
必須
内容模型
(%block;)+
出現できる文脈
%block な文脈
属性
属性名属性値既定値説明状態出典
class(なし)[HTML 4] %coreattrs ⊂ %attrs, [XHTML 1] CoreCommon
dir書字方向[HTML 4] %i18n ⊂ %attrs, [XHTML 1] I18N ⊂ Common
idID(なし)一意識別子[HTML 4] %coreattrs ⊂ %attrs, [XHTML 1] Core ⊂ Common
lang自然言語[HTML 4] %i18n ⊂ %attrs
xml:lang自然言語[XHTML 1] I18N ⊂ Common
onclick%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
ondblclick%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onkeydown%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onkeypress%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onkeyup%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onmousedown%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onmousemove%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onmouseout%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onmouseover%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onmouseup%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
styleスタイル情報[HTML 4] %coreattrs ⊂ %attrs, [XHTML 1] Style ⊂ Common
title注釈的題[HTML 4] %coreattrs ⊂ %attrs, [XHTML 1] Core ⊂ Common

レンダリング

[10] スクリプト対応 UA は、次の場合のみ noscript の内容をレンダリングするべきです HTML 4 18.3.1

  • スクリプトを実行しないように設定されている場合。
  • 文書の前の方 (earlier) script 要素で呼出れたスクリプトの言語に対応していない場合。

スクリプト未対応 UA は、 noscript の内容をレンダリングしなければなりません HTML 4 18.3.1

[12] どうやら、内在事象属性は無視のようです。

歴史

XHTML2

[28] XHTML2 にもはじめは含まれていましたが、第6次案で削除されました。

不思議解釈

[13] 検索円陣 spam: noscript は近代視覚ブラウザの初期設定ではレンダリングされないことから、 検索円陣spam のためにこの要素が悪用されることがあります。

[11] 代替内容としてデータへのリンクを提供する例 HTML 4 18.3.1

<SCRIPT type="text/tcl">
 ...some Tcl script to insert data...
</SCRIPT>
<NOSCRIPT>
 <P>Access the <A href="http://someplace.com/data">data.</A>
</NOSCRIPT>

メモ

[2] >>1 文書構造的にはなんなんだ? って気はする。 XHTML 2 で整理を希望。

[3] こういうのを JavaScript のみ対応の UA に与えたら、あんまり嬉しい結果にならないような。

 <script type="text/vbscript" language="vbscript">
   msgbox "Hello VB!"
 </script>
 <noscript>
   <p>Your User Agent does not support VBScript.</p>
 </noscript>

[4] >>3 XHTML 2 WD にはこうある。古い HTML でも同じだと思われ。 だから、希望通りになるはずだ。

  • The user agent is configured not to evaluate scripts.
  • The user agent doesn't support a scripting language invoked by a script element earlier in the document.
  • The user agent can't access an external script.

ただ、「早い部分」なんていい加減な条件だしなー。 何とかした方がいいと思う。 (というか埋め込み script はやめた方がいい。外部にしる!)

[5] 4: なんで XHTML2 WD から引用するのかって? そりゃあたまたま見てたからっすよ。

[6] HTML 4 でも >>4 と同じ。で、「早い部分」だと

 <script type="text/javascript" />
 <noscriot id="js" />
 <script type="text/vbscript" />
 <noscript id="vb" />

VBScript のみ非対応の場合に、 #vb はレンダリングするとして、 #js をレンダリングしてよいのか不明だ、 #vb だけするように明確化汁! って www-html に書いた人がいたんだけど、違う script 言語まぜて何か良いことあるの? って言われてますな。 (2003-02-01)

[7] http://pc.2ch.net/hp/kako/1008/10083/1008380243.html: HTML 4 の noscript 要素の親・子の内容模型について。

[14] Bug 127137 - noscript not used for non-javascript types https://bugzilla.mozilla.org/show_bug.cgi?id=127137 (名無しさん)

[15] Netscape Navigator 3で導入されました。

(名無しさん [sage])

[16] <noscript> per HTML 4.01 - Anne’s Weblog about Markup & Style http://annevankesteren.nl/2006/01/noscript (名無しさん 2006-01-31 02:02:52 +00:00)

[17] www-html@w3.org from July 2006: by thread http://lists.w3.org/Archives/Public/www-html/2006Jul/thread.html#msg37

noscriptdocument.write の代わりだから、それが動かない XHTML では不要だと Steven Pemberton は言っています。

(名無しさん 2006-08-05 05:54:30 +00:00)

[18] HP.com no clue NOSCRIPT - miscoded - by Hallvord R. M. Steen (2007-03-25 15:23:28 +09:00 版) http://my.opera.com/hallvors/blog/2007/03/23/hp-com-no-clue-noscript (名無しさん 2007-03-25 06:26:48 +00:00)

[23] Bug 815 &#8211; We shouldn't process content inside <NOSCRIPT> tags (2007-04-21 19:19:34 +09:00 版) https://bugzilla.mozilla.org/show_bug.cgi?id=815 (名無しさん)

[24] <noscript> should be allowed in <head> (David Hyatt <hyatt@...> 著, 2007-05-29 22:11:22 +09:00 版) http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/10851 (名無しさん 2007-06-04 11:56:13 +00:00)

[26] Re: XHTML handler module - no equivalent to NOSCRIPT? (PR#8018) (Steven Pemberton 著, 2007-08-21 00:15:02 +09:00 版) http://lists.w3.org/Archives/Public/public-xhtml2/2007Aug/0018.html (名無しさん)

[27] Re: several messages about <noscript> (Ian Hickson <ian@...> 著, 2008-04-12 07:25:48 +09:00 版) http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/13686 (名無しさん)

メモ

[29] (X)HTML5 Tracking ( 版) http://html5.org/tools/web-apps-tracker?from=4441&to=4442

[30] IRC logs: freenode / #whatwg / 20110405 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20110405

[31] Allow <noscript> in <head>? ( (Raphaël Quinet 著, 版)) http://lists.w3.org/Archives/Public/www-html-editor/2003JanMar/0082.html

[32] Web Applications 1.0 r2529 MAJOR CHANGES: Revamp the way scripts are specified, along with their interaction with resolving relative URLs, etc. Give enough detail to justify objects in the DOM not being garbage collected randomly when still in use. Define script groups, to handle scripts going away during document.open() and session history navigation. Define why and how setTimeout(), database transactions, etc, handle page transitions. Drop the terms 'with' and 'without' script, use script is 'enabled'/'disabled' instead. Define 'unload' and 'beforeunload'. Rework how onfoo= and .onfoo event handler attributes are defined. Rework how the content model of <noscript> is defined. Reword the way javascript: is defined to use the new terminology. Add a few notes of things that came up while I was doing all that.]] ( ( 版)) http://html5.org/tools/web-apps-tracker?from=2528&to=2529

[33] Welcome to Netscape Navigator 3.04 ( ( 版)) http://web.archive.org/web/20030208045953/http://wp.netscape.com/eng/mozilla/3.0/relnotes/windows-3.04.html#Features

[34] Web Applications 1.0 r8603 Make this <noscript> content model algorithm mildly simpler ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8602&to=8603

[35] Web Applications 1.0 r8733 Make noscript work in ATs when scripting is disabled ( ( 版)) http://html5.org/r/8733

[19] Define <noscript>'s rendering in terms of the `scripting` CSS media f… · whatwg/html@0a8ae31 ( 版) https://github.com/whatwg/html/commit/0a8ae31e9b117725634affa6b9dd8868274aa9cf

[20] Simplify last commit per suggestion from @tabatkins · whatwg/html@a59f63d ( 版) https://github.com/whatwg/html/commit/a59f63d7ae5cf44851d2cf87dde506a0e998c090

[21] 女子高生が鉄道模型を作った 繊細な表現、国際大会でV:朝日新聞デジタル ( 版) http://www.asahi.com/articles/ASHDS40XQHDSUTIL015.html

<noscript><p>お使いのブラウザはJavaScriptに対応していないか、または無効になっています。詳しくは<a href="http://www.asahi.com/policy/index.html">サイトポリシーのページ</a>をご覧ください。</p></noscript>

[22] 年賀状のサルを12年前と比べてみたら...デザイナーは同じ人、ヒツジでも話題に ( 版) http://www.huffingtonpost.jp/2015/12/30/new-years-card-monkey-2004-and-2016_n_8893298.html

<noscript>

<img src="http://b.scorecardresearch.com/p?c1=2&c2=6723616&c3=&c4=&c5=japan&c6=&c15=&cj=1" width="1" height="1" alt="" />

</noscript>

[25] 【ライブレポート】Kalafina、もっと先へ | Kalafina | BARKS音楽ニュース (ジャパンミュージックネットワーク株式会社 著, 版) http://www.barks.jp/news/?id=1000122862

<li>西野カナ</li>

<noscript>

<li class="noscript">JavaScriptを使用しています。</li>

</noscript>

</ul>

[36] 二次創作について - カクヨムヘルプセンター ( 版) https://kakuyomu.jp/help/entry/fan_fiction_sources

<noscript>

<iframe src="//b.yjtag.jp/iframe?c=nrWs82K" width="1" height="1" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>

</noscript>

[37] Refactor child Text nodes to a new concept · whatwg/html@0dd609f ( 版) https://github.com/whatwg/html/commit/0dd609fddc08dab337d24da874c787e51e851efc

[38] ( 版) https://sourceforge.net/projects/sparkylinux/?source=frontpage&position=1

</script>

<noscript><p><img src="//analytics.slashdotmedia.com/piwik.php?idsite=39" style="border:0;" alt="" /></p></noscript>

<!-- End Piwik Code -->

</head>

[39] () https://hojin-info.go.jp/hojin/TopPage

<noscript>

<div class="alert alert-danger cp-alert-danger clearfix" id="err01">

<span class="glyphicon cp-glyphicon-danger" aria-hidden="true"></span>

<div class="cp-alert-inner">当ホームページではJavaScriptを使用しています。お手数ですがJavaScriptの使用を有効にしてください。</div>

</div>

</noscript>

[40] Mutation XSS in Google Search | Acunetix, https://www.acunetix.com/blog/web-security-zone/mutation-xss-in-google-search/