Author |
Topic |
|
KC
Junior Member
USA
152 Posts |
Posted - 10 January 2002 : 10:42:33
|
If you use Cookies on your Snitz Forum, and someone enters your site inside another sites frame, your login will not work corectly.
You can login OK, and get the "You Logged In" message, but when the page refreshes you're not logged in.
This is because cookies are set to a domain or even subset of a domain, but when inside another sites frame you show as being in that THAT domain. Hence, the cookie does not match and no login.
To correct this, simply have your inc_top.asp page kick your page out of the frame.
I use this at the very top of my inc_top.asp page.
<script language = "Javascript"> if (top.location != location) top.location.href = location.href; </script>
In fact, I use that code on the top of every page someone may link to directly whether it uses cookies or not.
Just a tip.
Edited by - KC on 10 January 2002 10:45:47 |
|
msperry
Starting Member
USA
48 Posts |
Posted - 14 January 2002 : 10:08:17
|
But won't that show the new web address in the address bar.
Let me give you an example of what I mean. Say I own a domain name that I redirect to a subdirectory of another domain. So if I pop the forum out of the frame, won't the address bar show the redirected domain name and sub directory?
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 14 January 2002 : 10:35:29
|
I just tried this, by going to eastpasco.com via the links page in my forum (opens it in a frame) I did not experiencing any problems logging in to the forum at all.
|
|
|
KC
Junior Member
USA
152 Posts |
Posted - 15 January 2002 : 11:36:44
|
The index page URL of a frame page is what a browser sees regardless of the page URL you display in the body frame.
If the body frame page is the Forum, and your forum cookie is set to use it's URL as a check (not the whole domain of the server), and the frames Index page is not the same (different server) the cookie won't work.
The point of the little code snippet is just a quick way to kick your web site out of a linking sites frames is all.
|
|
|
|
Topic |
|