XF 1.5 Detect slow network connection

Flagy_

Active member
Hey,
I am using an animated background for my forum and I am wondering if there is an option to detect slow network connections and if it detects, stop the animation and use an image. Is this possible?
 
My guess here would be to use a js timeout after like let's say 10 seconds. Within the timeout function you should check if the page has fully loaded, if not replace the animation with the image. Something like this, it will need some tweeks from yourself though:
JavaScript:
    (function() {
        setTimeout(
            function() {
                if (document.readyState !== 'complete') {
                    //do your image stuff here
                }
            }, 10000)
        }
    )();
 
Back
Top Bottom