K
K
Konstantin2017-09-28 07:40:53
JavaScript
Konstantin, 2017-09-28 07:40:53

Scripts do not work in Google Chrome. Bug or optimization features?

Now I'm using the jQuery Viewport Checker plugin to animate the appearance of blocks on the site. Until a certain point, everything worked flawlessly. Now the problems started. On more powerful computers, everything still works without problems, however, on weak machines, some of the scripts do not work, in particular, the Viewport Checker does not work. Also, event triggers often do not work on onload. This behavior is typical only for desktop Chrome (maybe other browsers on Webkit too), on mobile and in other browsers everything always works well.
I tried to remove all the code except for the call to the plugin, the problem still remains in place.
Link to the working domain:
central.mrkalu0a.beget.tech
Only one warning is issued to the console:

Blink deferred a task in order to make a scrolling smoother. Your timer and network tasks should take less than 50ms to run to avoid this. Please see https://developers.google.com/web/tools/chrome-dev... and https://crbug.com/574343#c40 for more information.

In order for Chrome not to issue this warning, I had to put some of the functions in onload, now the warning often does not write to the console, but the animation does not plow anyway.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question