Thirteen Years of Service
Posts: 529
Threads: 52
RE: Blocking View-Source: command 04-18-2014, 05:47 AM
#11
Yeh!! Blocking users from viewing the source code of your HTML is very tough. There are tons of ways to view it, and few to hide it (and users find the other way in to your source). I have spent days figuring out how to hide it, but in vain.
The farthest I went was when I converted the whole website to Flash, and it cost me dear as I had compromised with SEO that way. Still the source was not 100% hidden as someone would easily extract the source files from a .swf.
![[Image: MUJ8qSW.png]](http://i.imgur.com/MUJ8qSW.png)
-----------------------------------
Now learning:
Android Development, Java
Working on:
An FTP Client for Android
-----------------------------------
•
Thirteen Years of Service
Posts: 529
Threads: 52
RE: Blocking View-Source: command 04-18-2014, 05:47 AM
#12
Yeh!! Blocking users from viewing the source code of your HTML is very tough. There are tons of ways to view it, and few to hide it (and users find the other way in to your source). I have spent days figuring out how to hide it, but in vain.
The farthest I went was when I converted the whole website to Flash, and it cost me dear as I had compromised with SEO that way. Still the source was not 100% hidden as someone would easily extract the source files from a .swf.
![[Image: MUJ8qSW.png]](http://i.imgur.com/MUJ8qSW.png)
-----------------------------------
Now learning:
Android Development, Java
Working on:
An FTP Client for Android
-----------------------------------
•
Thirteen Years of Service
Posts: 3,143
Threads: 100
RE: Blocking View-Source: command 04-18-2014, 07:07 AM
#13
I don't see any point of hiding your source code, There are very few ways to do that but they are easy to break. For example you can encrypt your source code but there are hundreds of sites that can decrypt it for you.
BTW what is it that you are trying to hide? I was curious about this matter when I was going to use Javascript in one of my clients site because it's Client Side and it's visible to the user hence I had to take care of security.
Please enlighten us more
•
Thirteen Years of Service
Posts: 3,143
Threads: 100
RE: Blocking View-Source: command 04-18-2014, 07:07 AM
#14
I don't see any point of hiding your source code, There are very few ways to do that but they are easy to break. For example you can encrypt your source code but there are hundreds of sites that can decrypt it for you.
BTW what is it that you are trying to hide? I was curious about this matter when I was going to use Javascript in one of my clients site because it's Client Side and it's visible to the user hence I had to take care of security.
Please enlighten us more
•
Thirteen Years of Service
Posts: 3,143
Threads: 100
RE: Blocking View-Source: command 04-18-2014, 07:07 AM
#15
I don't see any point of hiding your source code, There are very few ways to do that but they are easy to break. For example you can encrypt your source code but there are hundreds of sites that can decrypt it for you.
BTW what is it that you are trying to hide? I was curious about this matter when I was going to use Javascript in one of my clients site because it's Client Side and it's visible to the user hence I had to take care of security.
Please enlighten us more
•
Twelve Years of Service
Posts: 22
Threads: 3
RE: Blocking View-Source: command 04-18-2014, 10:26 AM
#16
<script language="JavaScript">
<!--
document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}
// -->
</script>
•
Twelve Years of Service
Posts: 22
Threads: 3
RE: Blocking View-Source: command 04-18-2014, 10:26 AM
#17
<script language="JavaScript">
<!--
document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}
// -->
</script>
•
Twelve Years of Service
Posts: 22
Threads: 3
RE: Blocking View-Source: command 04-18-2014, 10:26 AM
#18
<script language="JavaScript">
<!--
document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}
// -->
</script>
•