I looked through the forum listings and this seems to be the most appropriate place. Please be kind if it isn't...I'm new here. :)

So here's my situation/problem: I run a forum site - groundtradesxchange.com. I have a portal page that I like very much, but it seems like the speed with which this page displays is really slow.

I'm wondering if:

1) Someone might make a suggestion as to how to improve the speed of this page, without affecting the general appearance of the page, or

2) Someone might be interested in doing some speed optimization for hire.

Either way, responses are appreciated.


The portal page loads pretty quickly for me, especially after the first time. So it seems to me the portal is not too slow. I suggest you start a poll on the forum to see what your members think....

If you really wanted to make sure it is fast, you could have a script write the output to a static html file every five minutes or so. ie: cache the page.


That's an interesting idea.... Sounds like that's something you've heard of before. Is it something you've done yourself for a site?

Yes I have done it for my site ;) Although my site is small and doesn't have much traffic yet, so really doesnt need it. The script would be pretty small to do your portal page I think. Then setup a cron job to run it every so often, could save the server some overhead. If you want I will help, just contact me at heathnail@hotmail.com

I tried to visit your site a couple minutes ago and got a timeout twice. I was then able to get the site up. I think you should look into the possibility of a problem with your host. I'm no expert tho so maybe someone else can chime in on that possibility....


Thanks for the offer - I'll take you up on it. Timeouts are no good....I'm finding that having that Amazon ad on that page is slowing things down, but maybe there are other issues, too. If anyone else can suggest something, I'm all ears/eyes.

One hiccup of making the page static: the members would reach the page, they may see the login box and think they are not logged in, when in truth they would be logged in once they reached a dynamic page... So you might consider removing the login box to reduce confusion. The login part would still work, but they might login unneccessarily and complain that they can't stay logged in.

// Edit these...
$page_to_cache = 'http://mysite/myportalpage.php';
$page_to_write = 'indextest.html'

// Do not edit below...
$cache = file_get_contents($page_to_cache);

$fh = fopen($page_to_write, wb);
fwrite($fh, $cache);


This worked fine for a testing forum I have on my pc, the file it produced was an html file. Hopefully it will work for you. If you have any problems I will try to help.


Hmm.... This might present a problem to my people. They are typically not extremely web savvy, and also not all that patient. This might present a problem. Also, I'm thinking about ad rotation, too. A cached page would not have the opportunity to rotate ads, which could mess up delivery.

I feel kinda guilty after the work you put into writing the code, but I may need to consider another option.

Actually the adds would still work, because each time the page is refreshed or hit, the clients browser would request the info from the ad server...

Just remove the login from the portal and their is no confusion. The users could login in the forum.

I spent all of 5 minutes writing the script, so if you don't use it then no big deal :cool:

My opinion tho is to look into the server-dns side of things. Tell your hosting company that you have problems with slow load times and that people sometimes get timeouts when trying to connect.