openspeedtest / Speed-Test

SpeedTest by OpenSpeedTest™ is a Free and Open-Source HTML5 Network Performance Estimation Tool Written in Vanilla Javascript and only uses built-in Web APIs like XMLHttpRequest (XHR), HTML, CSS, JS, & SVG. No Third-Party frameworks or libraries are Required. Started in 2011 and moved to OpenSpeedTest.com dedicated Project/Domain Name in 2013.
https://openspeedtest.com
MIT License
2.28k stars 221 forks source link

Update index.html #137

Open hamedprog opened 7 months ago

hamedprog commented 7 months ago

in certain ports, such as 3010, 3020, or …, the site was facing issues with loading, and it wouldn’t load the SVG file. Upon inspection, it was discovered that sometimes, in the following line, el is null:

self.el.style.display = "block";

Initially, the problem was resolved by creating a delay in the execution of the following line:

OpenSpeedTest.Start();

Then, it was determined that the problem could be solved by making changes in the index.html file. We used an iframe instead of an object tag."

RachelJill commented 2 weeks ago

in certain ports, such as 3010, 3020, or …, the site was facing issues with loading, and it wouldn’t load the SVG file. Upon inspection, it was discovered that sometimes, in the following line, el is null:

self.el.style.display = "block";

Initially, the problem was resolved by creating a delay in the execution of the following line:

OpenSpeedTest.Start();

Then, it was determined that the problem could be solved by making changes in the index.html file. We used an iframe instead of an object tag."

vishnunuk commented 2 weeks ago

@RachelJill @hamedprog In the next version, we’ll enhance reliability by verifying that the SVG is fully loaded before initiating the start function. If it’s not yet loaded, the app will seamlessly use XHR to ensure everything proceeds smoothly.