css - html5javascript means can not protect source codes? - Stack Overflow

I am learning html5css3javascript.But I have found that the samples on the web disclose their source

I am learning html5/css3/javascript.

But I have found that the samples on the web disclose their source codes.

Does this mean html5/javascript can not protect source codes?

Wele any ments.

I am learning html5/css3/javascript.

But I have found that the samples on the web disclose their source codes.

Does this mean html5/javascript can not protect source codes?

Wele any ments.

Share Improve this question edited May 27, 2011 at 2:46 Sparky 98.8k26 gold badges202 silver badges290 bronze badges asked May 27, 2011 at 2:35 monsabremonsabre 2,0993 gold badges29 silver badges48 bronze badges 1
  • 5 That's really no different than it's always been. – Sparky Commented May 27, 2011 at 2:38
Add a ment  | 

3 Answers 3

Reset to default 11

All of those (HTML, CSS, JavaScript) work on the client side, always have, they are part of the presentation layer and the web browsers have always been capable of displaying the source code for what's presented to the user.

So no, you can't have closed-source projects that are solely based upon HTML, CSS and/or JavaScript

You can't really protect JavaScript since it has be run by the browser.

There are tools to obfuscate JavaScript but it's trivial to reverse the process.

One of the things that really irritates me about JavaScript is the fact that it is non-piled. One way you can help bat this is by using a minifier before you deploy your source. Here is a good one for CSS and Javascript: http://aspnet.codeplex./releases/view/40584

Another way you can manipulate the Document Object Model (DOM) without using Javascript is the use Silverlight/Flash or a Java/DOM API like: http://www-archive.mozilla/projects/blackwood/dom/

You can also try using an obfuscator but usually minification does a fair job of obfuscation. Please don't rely on JavaScript to enforce secuity for your site since Javascript can be easily hacked. It is okay to use JavaScript to help the user find his/her way, but all client side Javascript validation must be followed up with Server Side validation.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745040458a4607779.html

相关推荐

  • css - html5javascript means can not protect source codes? - Stack Overflow

    I am learning html5css3javascript.But I have found that the samples on the web disclose their source

    8小时前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信