Reputation: 95
For a customer's high school project, I have created a static but relatively complex website using HTML and Javascript only. Now, before customer pays me, he wants to have a look at the website. Therefore, he requested me to host it temporarily on AWS S3. But I am afraid that he will click on view source and download all the code, and might not pay me afterward.
Is there a way to hide my code in the above scenario, except using team viewer, where the customer accesses my personal computer.
Upvotes: 1
Views: 82
Reputation: 95
Luckily, I found a way to achieve this. The following code can be used:
<head>
<script>function myFunction()
{
var g1 = new Date(); //Today
var g2 = new Date('2020-10-06'); //The date from which trial version should stop working
if (g1 > g2)
{
alert("Trial Period Expired");
}
else
{
//-------------Normal code goes here-------
}
}
</script>
</head>
<body onload="myFunction()">
</body>
Now, just encrypt the code using some free online tools so that the Date can't be altered by the user.
Upvotes: -1
Reputation: 163272
This is not possible.
The best you can do is send some screenshots, but of course this isn't very interactive, nor a good way to evaluate a website.
Upvotes: 2