简体   繁体   中英

Is there any aspect of my JS that could be causing my website to load very slowly?

My website, http://www.denarri.com/ , is suddenly taking up to 15-20 seconds to load, when I haven't made any recent changes to it. I've been receiving this same complaint from users on a variety of devices/OS's/browsers.

I tried using Google's PageSpeed Insight tool, and the only major issue it found was that one of the images wasn't optimized, but that would only save 450kb, I doubt this would cause the website to load so slowly.

Is there anything upon using "View Page Source" that would indicate what could be causing this? Happy to provide specific parts of my JS, just didn't want to post a wall of code here.

I have loaded your page and checked what was making it load that slow with the Google Chrome DevTools and, as you can see in the screenshot below, the main problem resides in loading that heavy background image ( http://www.denarri.com/img/Background%20photo%20coffee.jpg - it's almost 8MB !).

Google Chrome DevTools屏幕截图


NOTE: There's also another image ( http://www.denarri.com/img/screenshot.png ) that took almost a couple of seconds to load.

You have to be careful with images on sites, as they can cause them to take some time to load.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM