Forum Moderators: open

Message Too Old, No Replies

Different images based on referring domain

         

flagflag

4:44 pm on Jan 29, 2006 (gmt 0)

10+ Year Member



Looking for a way to insert an different image based on what web site my visitors come from.

example:

Visitor A comes to my site from cnn.com I want to display image a.jpg

visitor B comes from abc then I display image b.jpg

if refferal page is not list it uses a default image c

any help would be appreciated.

[edited by: encyclo at 4:55 pm (utc) on Jan. 29, 2006]
[edit reason] no email sigs please [/edit]

RonPK

5:05 pm on Jan 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That can be done server-side as well as client-side (JavaScript). A server-side solution is preferable as it does not depend on Javascript being enabled in the client's browser. Of course you need to be able to use some script on the server.

No matter what technique you choose, keep in mind that not all browsers pass the referrer. You should not rely on the script too heavily.

added: I notice that you've posted the same question in the Javascript forum. Good luck over there.