Jump to content

Recommended Posts

I've got this page http://www.skipwallace.com/2010site/home.php and all the page extensions are .php to accommodate the random affiliate ads on the page.

 

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

 

Oh, when I create 'index.php' would that work the same as 'index.html' or do I need a redirect? 

Link to comment
https://forums.phpfreaks.com/topic/189310-php-pages-loading-slowwhat-to-do/
Share on other sites

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.

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>

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.