HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 9th, 2004, 03:22 PM
N6MQD N6MQD is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 2 N6MQD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry Stop Stealing Me with Frames

Is there a way to stop a person from creating a web page using a frame set where the main frame content is another person's web page? I presume there must be a way of stopping this, otherwise anyone can steal another persons site simply by opening their own domain name, adding a frame page and sticking someone elese web site under their domain name.

I've looked around but can't find anything except articles on cross-frame scripting.

Help would be appreciated soon, as someone is doint this to my site right now, and I want to stop it.

Reply With Quote
  #2  
Old April 11th, 2004, 12:12 AM
nschafer's Avatar
nschafer nschafer is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Mar 2004
Location: Florida
Posts: 584 nschafer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 46 m 5 sec
Reputation Power: 5
Red face

How about if you put in a javascript something like the following:

This will check to see if the parent URL matches the document URL if not then it will display an alert notifying the user that the page is being "stolen". It will then redirect the user to that page on your site.

This might be going a bit far, but I am pretty sure that people will stop inserting your pages into frames pretty quickly if you do this.

Note that using window.close(); or document.close(); doesn't work your page will still show in the frame.

You could also tell the browser to close using parent.window.close(); this will give a warning from the browser that it is attempting to close. If the user chooses not to close the browser your data will still be displayed, but I'm pretty sure the folks putting your page in their frame would stop doing so because of the annoyance to their users.

Hope this helps you.

Code:
<script language="Javascript">
<!--
// This script will redirct the parent page to this page
// if it is in a frame.
if (parent.location != document.location)
{
alert("This web site is trying to steal my work. Accordingly we will redirct you to our page.");
parent.window.location=window.location;
}
//-->
</script>
__________________
Neal Schafer
The early worm gets eaten.

Last edited by nschafer : April 11th, 2004 at 10:40 AM.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Stop Stealing Me with Frames


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway