Bandwidth Theft Prevention

Jul 27, 2002

I found this on JavaScriptKit. It checks to see if the site accessing the data is your domain. I found it pretty cool.

//Beginning of "test.js" file
var accepted_domains=new Array("wsabstract.com","javascriptkit.com")

var domaincheck=document.location.href //retrieve the current URL of user browser
var accepted_ok=false //set acess to false by default

if (domaincheck.indexOf("http")!=-1){ //if this is a http request
for (r=0;r<accepted_domains.length;r++){
if (domaincheck.indexOf(accepted_domains[r])!=-1){ //if a match is found
accepted_ok=true //set access to true, and break out of loop
break
}
}
}
else
accepted_ok=true

if (!accepted_ok){
alert("You're not allowed to directly link to this .js file on our server!")
history.back(-1)
}

/////rest of your libray
"
"
"

View 1 Replies


ADVERTISEMENT

Anti Email Address Theft + Mouse Over

Jan 30, 2003

I woud first of all like to post this nifty little script to stop robots stealing your email address from your website:

<script LANGUAGE="javascript">

var first = 'ma'
var second = 'il'
var third = 'to:'
var address = 'USERNAME'
var domain = 'HOTMAIL'
var ext = 'COM'
document.write('<a href="');
document.write(first+second+third);
document.write(address);
document.write('@');
document.write(domain);
document.write('.');
document.write(ext);
document.write('">');
document.write('Email Me</a>');

</script>

All you need to change is the Address, Domain, and Extension.

Secondly, I would like a little help with adapting this code. My problem is that I want to incorporate this code into a mouse over code that exchanges the picture. (see here:Email Test page (http://akhet.port5.com/email.htm), where I have put the two codes on one page but they are not combined properly yet.)

The end result would be a mouse over picture exchange that the visitor can click on to email me and no robots can steal my email address.

Any one know how to combine these two scripts effectively?

View 8 Replies View Related

JS Memory Leak Prevention?

Jan 19, 2010

Do the latest browsers still need this? I could find an article about IE8 which states that its garbage collection has improved so circular references shouldn't be a big problem any more.Reason for asking is that I maintain an JavaScript / AJAX framework and we are currently optimizing our code which contains a lot of code to remove references from and to the DOM and to remove event listeners.

View 1 Replies View Related

Prevention : People Stealing Pages

Feb 22, 2001

i want the browser to test wether or not a page that is
called is beieng called from within the specified window
the script is originally used to prevent a page within a frame to be called alone it redirected the user to the main window if i can call it that so that parts of
your frames could not be viewed alone

i have managed to secure most of my site
no rightclicks can be performed and no options to view
source code by using a chromeless window the problem now
is that i wanna make sure that someone cannot call a page
into a normal browser window by using shift while clicking
on links thus preventing anyone from getting to my source code.

View 10 Replies View Related

Stop People Using Bandwidth

Jul 23, 2005

Does anyone have a good java script that I can add to my page so that the same user doesn't pound my site and use all of my bandwidth?

View 12 Replies View Related

Switch Content If Low Bandwidth

Sep 24, 2007

Is there a way where I can "guess" what relative speed the user's
connection is?

Currently, the client is wanting some graphical intensive content and
I'd like to be able to warn users on dial-up to allow them to go to a
"gracefully degraded" version.

I thought of simply putting up a question for users to answer but the
client would rather it happen, more or less, automatically.

View 7 Replies View Related

Saving Bandwidth With Javascript

Mar 7, 2003

What I'm doing is taking the parts of my web site that apear on every page, for example the tags from the first <html> tag to the <body> tag, and I just put some JS code into an external file that tells it to write that same code to the browser, then I call the external file where I had the original code.

That way the external file gets cached and they don't have to re-download that part of the code every time.

Combining this, with some other things including gzip I've been able to get my main index page down to 300 bytes, not including images, css files or js files, which are only downloaded once because of caching anyways(and they aren't that big in size themselves, either).

Of course this wouldn't work if you don't want to alienate people who don't use javascript, but 9/10 people do so for some this might be helpful...

Also, this still works with dynamic content as well. for example what I did for my main page where I display the news in little "news boxes" as I call them which are basicly divs setup so they look nice visually... what I did was make a function in the external JS file that accepts the different parts of the news box such as subject, body, time/date of post and who posted it, and then it creates the HTML for it. Then it's really easy to change the look of the displayed news by just changing the js file.

View 3 Replies View Related

Minimum Bandwidth For Streaming Picture?

Jul 23, 2005

I need to know the min bandwidth for streming picture?

View 1 Replies View Related

Style Switcher If Low Bandwidth Detected

Mar 22, 2010

How would you go about writing a script to switch the style sheet if low bandwidth is detected? Is this even possible?

View 3 Replies View Related

Javascript - Download/upload Times W/bandwidth

Jul 20, 2005

I'm trying to come up with a script and I'm having a heck of a time...

I require users to enter the size (in MB or KB) of the attachment they
wish to transfer/upload. As they enter the number and move over to
the next field (using onBlur or...), I would like a popup/alert window
warning them that this attachment size would take "x" amount of time
based on a speed of 24 kilobits per second (kbps). If they are happy
with the amount of time, I wish to allow them to click OK (to carry on
with the transfer) or Cancel/No to cancel it.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved