Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ヘッド画像へ無限にリクエストが飛んでしまう #49

Closed
inouetakuya opened this issue May 15, 2019 · 4 comments · Fixed by #50
Closed

fix: ヘッド画像へ無限にリクエストが飛んでしまう #49

inouetakuya opened this issue May 15, 2019 · 4 comments · Fixed by #50
Labels
help wanted Extra attention is needed invalid This doesn't seem right

Comments

@inouetakuya
Copy link
Contributor

https://vuejs-jp.slack.com/archives/GENQVSDT3/p1557889295231700

現象

Chrome Dev Tools で Disable cache にチェックを入れた状態で、

https://vuefes.jp/2019/ へアクセスしたときに https://vuefes.jp/2019/_nuxt/img/2d41e4e.png へ無限にリクエストが飛ぶ。

@inouetakuya inouetakuya added this to To do in ティザーサイト Phase 2 via automation May 15, 2019
@hashrock
Copy link
Contributor

@inouetakuya
ああっ申し訳ないです、でもなんででしょう…?調べてみます!

DevToolのDisable CacheをOnにするとずっと発火するみたいなんですが、
Service Workerから出ているようなので、Nuxtの仕組みも絡んでいるんでしょうかね…?

@shika358
Copy link
Contributor

shika358 commented May 15, 2019

@inouetakuya @hashrock
こちらですが、Disable Cache関係なく自分の環境では発生しています。
キャッシュクリアをしたあとにアクセスすると自動更新が発生しない。
上記のあとにもう一度更新すると、読み込みループが発生する。
ような状況のようです。

vuefes2019

@inouetakuya
Copy link
Contributor Author

うーん、リクエストを飛ばしている箇所は下記のようなのですが、どうやって直せばよいか確認中...

https://github.com/kazupon/vuefes-2019/blob/2f65c2b385318e1a9a82aa634a43077350b6db4e/src/components/TheHeadSection.vue#L279-L283

@inouetakuya
Copy link
Contributor Author

inouetakuya commented May 15, 2019

this.t の最大値を定義してあげれば良さそう。とりあえずプルリク出しますね :octocat:

setInterval(() => {
  if (this.loadedImages >= 6) {
    if (this.t < 27) { // 最大値が 27 で良いのかは追って確認します
      this.t++
    }
  }
}, 90)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed invalid This doesn't seem right
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants