1
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.

turbolinksとaudioとブラウザバック

Posted at
  1. turbolinksを有効にしているRailsプロジェクト
  2. とあるボタンを押すと、Audioタグ(autoplay: true)が現れて音声を再生させる
  3. ブラウザバックする

すると、なぜか、戻った時に2で流れていたAudioタグの音声が再生される。
という問題。

特に何も考えずに手っ取り早く治す方法。

haml
%meta{ content: 'no-cache', name: 'turbolinks-cache-control'}

とりあえず、キャッシュを無効にする。

1
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
1
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?