hi there,
so i vaguely remember viewing the source code to some internet sites, which appeared much shorter compared to the lengthy, complex content that was actually displayed... i'd like to know if there's a way to hide the script portion (or all portions) of an internet site from being viewed in a browser's "View Page Source"...
thanks.
3 2060 acoder 16,027
Recognized Expert Moderator MVP
No that is not possible, because whatever techniques you use, anyone with some technical knowledge will be able to easily obtain your scripts. For example, you can use:
[HTML]<script src="js/myjsscript.js"> </script>[/HTML] but I can easily download or view that script.
Other techniques to 'hide' javascript involves encoding it and also including a decoder, but that is never foolproof, e.g. see this link.
Other techniques to 'hide' javascript involves encoding it and also including a decoder, but that is never foolproof, e.g. see this link.
Doesn't compressing your js make it harder to steal? Or is there a way to decompress it? Is the compression just the encoding that you linked to?
acoder 16,027
Recognized Expert Moderator MVP
Doesn't compressing your js make it harder to steal? Or is there a way to decompress it? Is the compression just the encoding that you linked to?
Yes, it does make it harder to steal, but if someone is determined enough, he can discover your algorithm and decode or decompress the code - that's why it's not completely foolproof. Remember you have to include the decode algorithm on the page.
For Javascript compression, you can look at this and Dojo's Shrinksafe (linked on that page).
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Mark |
last post by:
Sorry, I'm a newbie to php ;)
I was thinking about using php to write the script file, something
like:
<script type="text/javascript"
src="http://insert_url_here.com/myScript.php"></script>
The php file then echo'ing the source code. If that works then how can
I stop the php file being loaded directly, that is the user browsing
|
by: Mark |
last post by:
Hi - I have a function which shows/hides a <div> on my page - this
appears to oinly work in IE, but I also need it to work in Netscape 7.1.
My function is in my head:
function openIt(faq) {
showIt = document.all(faq);
if (showIt.style.display == "none") {
showIt.style.display = ""
} else {
|
by: dmiller23462 |
last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript
but my end result is I need two text boxes to stay hidden until a
particular option is selected....I've cobbled together the JavaScript
in this code from a couple different sites but I'm not 100% sure what
each line is doing...This is the ASP code that I'm using for the
page....Take a look at the JavaScript code and please let me know what
each line is doing....I have been...
|
by: Fernando Fernández |
last post by:
Hi people :))
I am Fernando and I have made a web application with HTML and JavaScript.
Now I would like to hide the source code, or at least my JavaScript source
code. Is it possible? is there a method for doing it?
Thanks you from Palma de Mallorca, Spain
Fernando
|
by: SOLAV |
last post by:
This is the only working way to completely hide your JavaScript code from the client just like PHP or ASP code.
Here we'll need the help of PHP. Here is the code:
index.php
________________________________________________________
<?PHP
@session_start(); //Start our session.
if(@!session_is_registered('PrintTheJavaScript')){ //If the session is not registered (and it's not).
@session_register('PrintTheJavaScript'); //Register the...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |