PDA

View Full Version : block access to site if cookies are block



chicago
December 16th, 2003, 11:05 AM
anyone know a way to direct someone to a page saying they cant view the page if they have cookies set to blocked?


only tried a couple of searches before posting but I thought I would ask since it should be a must haveon your site if you are with any affiliate program that uses links with cookies.Whats the point of even allowing someone on your site if youarent going to get credit for sales theygenerate because they have cookies blocked?I know this has beendiscussed before and certain people that were making a killing because of blocked cookiesargued that most people dont know how to turn them off. Butthese new AOL programs anda lotof the anti-virus programs have default settings to block cooks.

smokey
December 16th, 2003, 11:09 AM
are yougoing to useasp or php or jscript???

RxRob
December 16th, 2003, 11:26 AM
There is only one way to tell if a surfer has cookies turned off:


Set a cookie on page A and then try to load it on page B. In other words, there's no way to tell on a single page view (as far as I know).

smokey
December 16th, 2003, 11:39 AM
check to see if you can set a sessionid if you can't cookies are disabled.

chicago
December 16th, 2003, 12:15 PM
asp


I have never used cookies or session idsor attempted to learn about them but I will now and try these methods

EPSRX
December 16th, 2003, 01:58 PM
Chicago,

Try this out and hope it helps you smileys/smiley2.gif

<%
Response.Cookies("Check") ("Cookie")= "Test"

IF Request.Cookies("Check") ("Cookie") = "" Then
Response.Write "Cookies are blocked"
End If
%>

dpillz
March 30th, 2004, 05:45 PM
Might help, but might be complicated :

you can have 2 frames/iframes on the test page
and include (in the frame)
1st: set a cookie
2nd: read the cookie back

technically it is 3 pages loading, and if the main page is on a different domain, you will be able to see the cookies on the 2nd included page...

I did something like this a while ago and it worked...


if you do not like it, you can set a cookie on page A then refresh the page and read the cookie back to check, or redirect to page B where you can already display what you want based on the test cookie result ...

beware: search engine spiders do not necessarily accept your cookies ... you can comfortably de-list your site with that from search engines ...:(

redex
March 30th, 2004, 07:50 PM
All these cookies and no milk smileys/smiley6.gif smileys/smiley8.gif