Sami_Hamlaoui
2005-12-05, 06:14 PM
I noticed that whenever I go to giantitp.com, I get a lot of "connecting..." "waiting for..." messages in the bottom of the taskbar. This is usually attributed to looking up the IP of the website from the URL, and should only happen once.
Upon checking the source code, it seems that nigh-on EVERY image here, along with every link, uses the full URL, i.e. "http://www.giantitp.com/blahblahblah.html" instead of just "blahblahblah.html". Everytime it encounters a "http://www.giantitp.com/", the IP is looked up. Now, imagine the forums with hundreds of little icons. Yep you guessed it, that's hundreds of IP lookups, making the page load slower for everyone.
The solution? Relative URLS. "http://www.giantitp.com/Shop.html" would be linked to as just "Shop.html" - "http://www.giantitp.com/mb/YaBBImages/embarassed.gif" would be "../../mb/yabbImages/embarassed.gif" (assuming it came from the "Start new topic" page), and so on.
As a former web-developer myself I know these kinds of problems can kill a site without anyone knowing about it - people looking for problems server-side whereas in fact it's all down to the client repeatedly looking up the IP of the server.
GL fixing it :)
Upon checking the source code, it seems that nigh-on EVERY image here, along with every link, uses the full URL, i.e. "http://www.giantitp.com/blahblahblah.html" instead of just "blahblahblah.html". Everytime it encounters a "http://www.giantitp.com/", the IP is looked up. Now, imagine the forums with hundreds of little icons. Yep you guessed it, that's hundreds of IP lookups, making the page load slower for everyone.
The solution? Relative URLS. "http://www.giantitp.com/Shop.html" would be linked to as just "Shop.html" - "http://www.giantitp.com/mb/YaBBImages/embarassed.gif" would be "../../mb/yabbImages/embarassed.gif" (assuming it came from the "Start new topic" page), and so on.
As a former web-developer myself I know these kinds of problems can kill a site without anyone knowing about it - people looking for problems server-side whereas in fact it's all down to the client repeatedly looking up the IP of the server.
GL fixing it :)