A
A
Alex2016-09-30 10:28:01
JavaScript
Alex, 2016-09-30 10:28:01

How to turn off JS script on weak PCs?

Greetings!
There is an SVG animation on the site via SetInterval. So she slows down on weak PCs and eats percent ...
I tried requestAnimationFrame, it gets even worse.
so, I want to turn off the animation and just show SVG on weak PCs / devices.
Google was not banned, but could not find it. I ask to prompt where to dig.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2016-09-30
@streetflush

I would count the milliseconds between calls to requestAnimationFrame and if the average value is over ten frames, then the computer is weak and the animation should be stopped. You can also reset cookies so that you no longer calculate.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question