A small addition to Fravia's makepa2.htm
(making things a little bit harder)
javascri
Advanced java-script
June 1999
by The Seeker

Well, to make things clear at the very beginning : I think we all agree that it is rather impossible to 'protect' a web-site with some java-script- code ! Nevertheless, it is still a good way to keep a lot of lamers out. (And let's forget for a while all the site-grabber-programs around ;)

Today's problem :
After playing a little bit with Fravia's makepa2.htm, you will see that it is rather easy to get the whole page displayed :
just turn your java-script in your browser OFF and you are allowed to see everything.

Hmm, not very nice ! How can we avoid this ?

- METHOD 1 : use a "java-script-link"
On our starting-page (page1.htm) there could be some code like this :

<FORM>

<INPUT TYPE="button" VALUE=" some text " onfiltered="location.href='page2.html'">

</FORM>

Our visitor will only see some click-button.
Pro :
- We can be sure, that our visitor has turned on his java-script when he reaches our password-protection at page2.htm
- We can prevent that our page2.htm will be downloaded with SHIFT-Left-Clicking at the link.
Con :
- It could be, that some lamers are clicking their mouse to death (Unless you tell them 'additionally' to turn their java-script on)

- METHOD 1 : use a "strainer"
On our starting-page (page1.htm) there could be some code like this :
(copied from the starting-page of my little java-script-site, where I use it to make clear that you must have turned your java-script ON at this site)

<HTML>

<HEAD>

<TITLE>The java-script Noteblock : are you ready ???</TITLE>

 ....

 <META NAME="...." Confiltered="...">

  

 <SCRIPT LANGUAGE="java-script"> 

  <!-- 

  window.location = "nb_main.html"	 

  //-->

  </SCRIPT> 

  <META HTTP-EQUIV="REFRESH" Confiltered="1; URL=nb_problem.html">

 </HEAD>

You probably see at the first look how it works :
- Every good guy (with java-script ON) is automatically directed to nb_main.html (where you can confront him at once with your password-prompt)
- Every bad guy (with java-script OFF) is automatically (via the META-Tag) directed to another page (where you can tell him to turn his java-script on - and if you wish, you can 'filter' all M$-exploders and send them to hell)

O.k., all of us should be able to reverse these 'traps'. As stated above, this is nothing more than a 'Kinderschreck'. I showed you two ways for this problem, should you know some other ways :
Please let us know
Regards
The Seeker