Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 04-09-06
Registered User
 
Join Date: Oct 2005
Posts: 426
Thanks: 0
Thanked 0 Times in 0 Posts
Nosmo_King is an unknown quantity at this point
  Force Browser Refresh

I'm playing with banner/ad rotators.

One of the problems is ads not changing - ie: the same banner is displayed on a page change. I understand this can be resolved by forcing a browser refresh on each page load.

I could do this with meta tags:
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-store">

Is this the best way to do it or does someone know something better?
__________________
Travel Domains for sale: luxuryhotelparis.co.uk italytravelguide.co.uk bettertravel.co.uk america-flights.co.uk bargainairline.co.uk costaricahotel.co.uk hotelsintallinn.co.uk
Pm me for prices.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-09-06
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,752
Thanks: 3
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
i use a simple php solution on most of my sites, see below.

PHP Code:
<? srand((double)microtime()*1000000);
$number rand(1,3);
$advert1 'banner code 1';
$advert2 'banner 2';
$advert3 'banner 3';
$choice "advert$number";
$adtoshow = ${$choice};
echo 
$adtoshow
?>
on each page reload it will just pick a banner at random, no weighting or anything though.

phpadsnew is the more advanced approach.

if you prefer JS then if you do a search for "javascript banner rotator" im sure your find a million
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-09-06
Registered User
 
Join Date: Oct 2005
Posts: 426
Thanks: 0
Thanked 0 Times in 0 Posts
Nosmo_King is an unknown quantity at this point
Not sure I follow - my php isn't that great.

So could I just creat a php script and call it from each page with an include?

I'm using phpadsnew for a few sites... but I have the same problem - ads not changing on each page change. Would like to get away from phpadsnew - it's great but a bit of a heavyweight for my traffic. I think it's cool if you want to serve up the same content to a number of sites - otherwise it's an overkill.

I've also got a few small sites running a simple php rotator with a text file which suffer the same problem. This is the route I would prefer to take - I want to perfect it so I can rotate graphics and text.

I'm sure I've read somewhere these things only work properly with a refresh. I'm using creative from various merchants... some of whom are straight html with no code to prevent caching.
__________________
Travel Domains for sale: luxuryhotelparis.co.uk italytravelguide.co.uk bettertravel.co.uk america-flights.co.uk bargainairline.co.uk costaricahotel.co.uk hotelsintallinn.co.uk
Pm me for prices.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-09-06
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,752
Thanks: 3
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
where i've typed 'banner code 1' 2 3 etc you just paste the HTML or JS or whatever for that banner. Just make sure you dont include any ' in the code, swap them to " if possible or escape them with a backslash like \'

Pasting this code into a php file will, on every page reload show a random banne,r you might get the same one once or twice but its random. Alternatively put this code in a seperate PHP file on its own and include that file where you want the banner, that way you can change one file to update all your pages.
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
O2 Tariff Refresh - More Minutes and Lower Rates phones2udirect Affiliate Window 1 14-07-06 04:03 PM
links in email open new browser window? Stuart The Affiliate Marketing Lounge 3 13-07-06 08:49 PM
PHP or Browser Timeout? Barry Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 6 28-04-04 01:04 PM
Avant Browser Mogga The Affiliate Marketing Lounge 14 04-03-04 05:23 PM
Web Browser Support (which versions?) Rich Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 2 14-10-03 11:54 PM


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7