Hi
I'm co-writing a coldfusion app which serves and tracks banner ad activity. When a user clicks on one of our advertiser's banners, I need the app to set a cookie and redirect the user to the merchant's click through page.
I know that you can't set a cookie and use cflocation in the same template. I've tried various alternative solutions and all to no avail:
1) using CFINCLUDE - I can't use cfinclude because the url that the user is being redirected to is a third party therefore I must specify the whole url.
2) using http meta refresh - we will be serving several million banners per month and performance would suffer due to the refresh
3) using CFHEADER refresh - same problem as above
4) setting the cookie and redirecting using 2 seperate custom tags - I thought this would seperate the cfcookie from the cflocation but not so. The cookie does not set.
5) using javascript - doesn't seem to work and users can turn off javascript at the client end which may cause problems.
6) using CFHTTP to get the merchant's clickthrough page. This works but displays the coldfusion template in the title bar instead of the merchant's url so that's no good to us either
Does anyone know of any way to achieve what we want without suffering a degradation in performance? Maybe we could try passing the url as a variable to an asp script. Would this work? Would we need to serialise the variable using CFWDDX before passing it to the asp page?
Any assistance would be invaluable to us as we're now banging our heads off brick walls.
Thanks in advance
Neil
I'm co-writing a coldfusion app which serves and tracks banner ad activity. When a user clicks on one of our advertiser's banners, I need the app to set a cookie and redirect the user to the merchant's click through page.
I know that you can't set a cookie and use cflocation in the same template. I've tried various alternative solutions and all to no avail:
1) using CFINCLUDE - I can't use cfinclude because the url that the user is being redirected to is a third party therefore I must specify the whole url.
2) using http meta refresh - we will be serving several million banners per month and performance would suffer due to the refresh
3) using CFHEADER refresh - same problem as above
4) setting the cookie and redirecting using 2 seperate custom tags - I thought this would seperate the cfcookie from the cflocation but not so. The cookie does not set.
5) using javascript - doesn't seem to work and users can turn off javascript at the client end which may cause problems.
6) using CFHTTP to get the merchant's clickthrough page. This works but displays the coldfusion template in the title bar instead of the merchant's url so that's no good to us either
Does anyone know of any way to achieve what we want without suffering a degradation in performance? Maybe we could try passing the url as a variable to an asp script. Would this work? Would we need to serialise the variable using CFWDDX before passing it to the asp page?
Any assistance would be invaluable to us as we're now banging our heads off brick walls.
Thanks in advance
Neil