Actually there is no way to protect your Javascript or CSS from being seen.
I've explained a way to sort of protect it from Safari/Firefox/IE in:
http://webtrick101.blogspot.com/2012/08/protect-your-css-and-javascript-codes.html
Nevertheless Chrome can easily show your CSS/Javascript codes to the world.
Since there is no way to block it, you might as well minify your Javascript/CSS codes. In that way, your codes will be harder to be understood and may sway some programmers from...
Wednesday, March 20, 2013
Saturday, March 9, 2013
Weird Javascript setInterval Scenarios in Chrome
This is a weird case.
function dummy() {
.
.
.
}
setInterval(dummy, 1000); // This will WORK in non-Object-Oriented Function
setInterval(dummy(), 1000); // This will not work as it has too many brackets
setInterval("dummy", 1000); // This will not work
setInterval("dummy()", 1000); // This will work even in a Object Oriented Function
I found when I tried to set an interval loop to a OO (Objected Oriented) Function as follows:
function dummy() {
.
.
.
this.action1...
Subscribe to:
Posts (Atom)