Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Snitz, Frames and Cookies Tip
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

KC
Junior Member

USA
152 Posts

Posted - 10 January 2002 :  10:42:33  Show Profile  Visit KC's Homepage
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  Show Profile  Visit msperry's Homepage
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?


Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 14 January 2002 :  10:35:29  Show Profile  Visit HuwR's Homepage
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.

Go to Top of Page

KC
Junior Member

USA
152 Posts

Posted - 15 January 2002 :  11:36:44  Show Profile  Visit KC's Homepage
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.


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000 Version 3.4.07