Link to home
Start Free TrialLog in
Avatar of ratboy
ratboy

asked on

HOW: Rotating Banners On Webpage w/o JS or CGI

I was on this webpage: http://javaboutique.internet.com/Jannal/

And they have a banner at the top/bottom of their webpage.  Everytime I load this page (I access the webpage and see a banner, then, close Netscape and access the webpage again -- I do not hit reload) it shows a new banner.  How do they do this without Javascript and a CGI script?  The banner is cached as well and so you'd think that when I go to access the page again (without reloading) it would fetch everything from cache!  Could SSI be involved even though the webpage doesn't have the extension .SHTML?

This is exactly what I want to do but I could only figure out doing such a trick with a call to a CGI-Perl script and noting the IP address of the user to just in case he/she clicks on the banner so as to return the proper URL.  The CGI script would return back the next image banner and place an Expires date on it.

The banner system this webpage is using seems less cumbursome then my webpage.  If you can tell me the method they use to do their banner system I'd be VERY grateful!  I must figure out this problem!

Thanks and good luck!
Avatar of ratboy
ratboy

ASKER

Edited text of question
Avatar of ratboy

ASKER

Edited text of question
Looks like a site configuation to me.  The whole site has the same layout.  Nice site, but kept crashing my ie4 browser with the java on the pages.  If not too fussy on what banners, could always look at link exchange.  Alternatively, you could use perl or javascript/vb script to do it, but this as you said is cumbersome.
Sorry not too helpful.
ASKER CERTIFIED SOLUTION
Avatar of mouatts
mouatts

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ratboy

ASKER

So then you're saying the page is actually getting its banners inserted by the server, much like SSI code is parsed from an HTML?  Ok I can accept that but for the banner not caching, how is this done?

The grapical banner is inserted as an <IMG> tag and is actually a GIF picture file (no call to a CGI script).  How does this graphical banner, then, set itself to NOT be cached?  Does the server also send back a PRAGMA: NO-CACHE or EXPIRES:  header?  And if it does, these 2 headers don't seem to work in Internet Explorer 3.  That is, when you use these headers the graphic is still cached no matter what.  However, the HTTP webpage mentioned (http://javaboutique.internet.com/Jannal/) shows signs of 'not' caching in IE.

Please help me understand exactly what is going on, and can an APACHE server help me achieve all these effects for my website, and is there a simpler solution to achieve the exact effect?

Thanks a bunch EVERYONE!
SSI is done as part of the parsing of the HTML so the two are related.

The HTTP pragma nocache is issued to prevent caching of the image. This does work in IE3 but at times seems a bit pickey when it comes to the exact format of the message.

Incidently older browsers didn't support nocache and a trick was to send no-cache and expires so that if one trick didn't work the other would. However these two messages according to the HTTP definition of there role makes them exclusive as the expires message should actually cache the element when received and only check the expiry date when the element is next accessed even if the expiry date is passed when it is first received. Therefore if you send both headers to a browser it has to make a choice as to which one it will ignore. I seem to recall that netscape 3 ignores the expires and IE 3 ignores the nocache. However it maybe that the order of the messages has an effect.

You can achieve this technique with most servers including Apache. The technique that I mentioned would be differcult with Oracle Web server and not the best way of doing things with IIS (where you would use ASPs ad rotator object).

There are a number of other ways that you can achieve the same sort of effect including using server push and CGI techniques which is the simplest really depends on your own areas of experience.

If you are patience I am currently writing a document on this very subject which will be on my Web site when it is relaunched next month. (www.bedrockcomputers.demon.co.uk)