Dolphin Browser と Default Android Browser は<noscript>
、これらのブラウザで javascript がオンになっているにもかかわらず、ページの先頭にあるセクションを読み込んでいます。これにより、それらのページのコンテンツがレンダリングされなくなります。
頭の中で、ブラウザでjavascriptがオフになっているときに、ページ上のdiv内のすべての表示をnoneに設定するaa cssスタイルシートにリンクしています。これは、非スクリプト要素内に存在することによって行われるため、スタイルシートは JavaScript がない場合にのみ読み取られます。
これは、私がテストしたすべてのデスクトップ/ラップトップ ブラウザーで機能します (アクセスできない mac ではテストされていません)。Firefox と Opera を搭載した Android で動作します。私はcyanongenmod 7しか持っていないので、Google Chromeはありません。
ただし、Dolphin とデフォルトの Android ブラウザーに関しては、noscript セクションにある css スタイルシートを読み取るため、これらのブラウザーではほとんどのページ/サイトがレンダリングされません。
head セクションからスタイルシート リンクを削除すると、これらのブラウザーでページが正しくレンダリングされることで、これが起こっていることを証明しました。
これらのブラウザで head セクションの noscript タグを尊重するようにする方法はありますか?
更新: これは HTML5 を使用しています - 頭のスクリプトは許可されていません: http://www.w3.org/TR/html5/the-noscript-element.html#the-noscript-element
<!DOCTYPE html>
<html>
<head>
<noscript>
<link href="${facesContext.externalContext.requestContextPath}/css/no_javascript.css" rel="stylesheet" type="text/css" />
<!-- this link is being read even if javascript in enabled in dolphin -->
</noscript>
</head>
<body>
<noscript>
stuff in this noscript element works correctly
</noscript>
<div class="no_javascript_disapear">
page full of stuff not being rendered because
dolphin browser is not respecting the noscript
tags in the head.
</div>
</body>
</html>
// css in the noscript tag:
.no_javascript_disapear {display:none;}