Jump to content

PHP Pages Loading Slow...What to do?


mattpooch

Recommended Posts

What can I do to make these pages load faster?  Would it help if they were HTML?

If the ads are served from a 3rd party server then they will have to be requested on each page load. Pages serving lots of ads will generally be slow. I don't know why your would request ads using php. They are usually javascript. If so you can include the ad code to be loaded after the HTML is sent to the browser. The server where the ads are requested from maybe busy therefore slowing your page load also.

 

Other things that can slow down a page are heavy database queries or poor code.

Link to comment
Share on other sites

no. i do not understand. affiliate ad code is fixed into your template. if you wanted to randomise between different ads then simply store the javascript code in different include files. i.e

ad1.js

ad2.js

ad3.js

To make it pick a random ad:

<script language="javascript" src="ad<?php print rand(1,3); ?>.js"></script>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.