Checking someones bandwidth and loading content based on it

后端 未结 6 1705
忘掉有多难
忘掉有多难 2021-02-14 21:29

I have seen a number of questions that don\'t answer this, is it possible to check someones bandwidth using java script and load specific content based on it?

The BBC se

6条回答
  •  天命终不由人
    2021-02-14 22:10

    I have released BwCh which is an open-source JavaScript API to detect bandwidth for web-based environments

    It is built with ES2015. It uses some of the latest JavaScript innovation (window.navigator.connection currently supported in Chrome 48+ for Android as of April 2016) in order to provide a flexible method to detect bandwidth for both mobile and desktop devices. It fallbacks/complements to image pre-loading to detect bandwidth where those newest API are not available.

提交回复
热议问题