0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

メモ: IE9以降でwebサーバの設定(?)によりiframe内のlocation.reload()をするとブラウザがifameのurlを表示する組み合わせがある

Last updated at Posted at 2016-06-28
  • IE9(win7), IE11(win7, win10)、Edgeで発生を確認。
  • chrome, firefox, safari(IOS9.3.2), IE6(xp), IE8(win7) では問題なし。
  • apacheは2.2系。
  • 同じような現象に遭遇した人用に残しておく。

IEの設定かも(?)

現象

iframe内のlocation.reload();を実行すると

index.png

iframeだけがブラウザに表示される (ブラウザのURLはiframeのsrc)

parts.png

という現象に遭遇。

なおこの現象は<a href="http://xxx.com/a.html">reload</a>と書けばフレーム内でリロード問題なかった。

ソース

index.html
aaa
<iframe src="http://xxx.com/a.html"></iframe>
aaa
a.html
<input type='button' onclick='location.reload();' value='reload' />

組み合わせ

  • urlはぼかしています。htmlファイル名は何でも良いです。
  • 発生するサーバ内で完結すると発生しない。
  • 発生するサーバがからむと発生する。
  • 発生しないサーバ同士だと発生しない。
パターン 有無
http://xxx.com/index.html で iframe src="http://xxx.com/a.html" の時 現象は起きない
http://xxx.com/index.html で iframe src="http://hoge.com/a.html" の時 発生
http://hoge.com/index.html で iframe src="http://xxx.com/a.html" の時 発生
http://fuga.com/index.html で iframe src="http://xxx.com/a.html" の時 現象は起きない
http://xxx.com/index.html で iframe src="http://fuga.com/a.html" の時 現象は起きない
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?