Support » Plugin: Jetpack by » Jetpack constantly calling device-jetpack.js

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor George Stephanis


    Code Monkey

    devicepx-jetpack should be running when the resolution of your screen or the page changes. For example, if you drag a window between a retina and non-retina display, or if you’re on a hidpi display, it will upsize any photon’ed images or the like.

    What page is this happening on, so we can give it a look?

    Plugin Contributor Enej Bajgoric



    Looking at the code of devicepx-jetpack.js it looks like devicepx-jetpack.js runs a function called ‘zoomImages’ every second. This function ensures that every image on your page looks great on retina displays.
    The reason it runs every seconds is to make sure if new images are loaded to the browser, for example using the infinite scroll, will be displayed nicely on retina displays as well. The action is pretty fast and skips images that have already been resized as well as is disabled if you are not using a device with a high resolution retina display.
    The graph that you are seeing I believe is not devicepx-jetpack.js being loaded every time but the inspector telling you that the browser is performing an action because of devicepx-jetpack.js, running the ‘zoomImages’ function.

    I have created a github issue looking to look further at optimizing the devicepx-jetpack.js script.

    Let me know if you have further questions or anything else you would like me to take a look.

    Plugin Contributor George Stephanis


    Code Monkey

    BTW, for the curious, here’s the full unminified devicepx-jetpack.js —

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Jetpack constantly calling device-jetpack.js’ is closed to new replies.