What's the best way to determine at runtime if a browser is too slow to gracefully handle complex JavaScript/CSS?

前端 未结 6 2215
挽巷
挽巷 2020-12-25 11:55

I\'m toying with the idea of progressively enabling/disabling JavaScript (and CSS) effects on a page - depending on how fast/slow the browser seems to be.

I\'m speci

6条回答
  •  长情又很酷
    2020-12-25 12:19

    A different approach, that does not need explicit benchmark, would be to progressively enable features.

    You could apply features in prioritized order, and after each one, drop the rest if a certain amount of time has passed.

    Ensuring that the most expensive features come last, you would present the user with a somewhat appropriate selection of features based on how speedy the browser is.

提交回复
热议问题