2

I am running a photography website for my girlfriend, and currently trying to improve the site's loading speed. It is a photography website, and thus many images are loaded, which makes it a little slow. This is expected and accepted to some extent.

However, when I looked at the waterfall diagram in Chrome, which shows loading time of different resources, I noticed that "DNS Lookup" of some images takes up to 6 seconds. This is weird, as the images are hosted on my own page, and other content (css, html) has already been loaded from the same domain at that point, so no additional DNS lookup should be necessary. What is happening here? Is it really a DNS lookup? If so, why does it take so long?

waterfall diagram

  • 1
    This looks like a local issue because the browser shouldn't have to do subsequent DNS queries if it is all hosted on the same domain which is it. 53 requests in 4~ seconds on second page load - puu.sh/tuGjr/06c8145c21.png – Analog Jan 21 '17 at 19:34
2

DNS lookups are not taking six seconds for all users, and you can confirm this by testing DNS speed with and of the third-party DNS speed testing services. Here is one example result from SolveDNS' test showing that DNS responses are actually very fast for the domain: http://www.solvedns.com/dnsspeedtest/evamilbrandt.de

Looking at the bigger picture, it appears that your web server does not have Keep Alive enabled, which is very strange. Enabling this is recommended (it is enabled by default) and will likely resolve the DNS issue because established connections will be re-used.

If speed is the goal, you have other optimizations you can make which are beyond the scope of this question, but you can consult a third-party testing site like GTmetrix for feedback on how fast your site is and what can be done to improve page load time. Here's a test I just ran for example: https://gtmetrix.com/reports/evamilbrandt.de/WN0LkH9B

Nice looking site by the way, now go make it fast and everyone will be happy!

  • Thank you for your answer! I have looked into it, and it seems that I really have to enable keep-alive myself. I will see if this helps the dns request, and then will look at everything that gtmetrix tells me can be improved. Google's pagespeed complains mainly about images not being compressed enough, and below-the-fold css, but I don't want to compress images further, and separating css into 'above the fold' and 'below the fold' also seems really complicated (it's wordpress), so I'm not going into that – Gasp0de Jan 23 '17 at 9:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.