如何使用GAE在线混淆html/javascript

How to obfuscate html/javascript online with GAE?

本文关键字:html javascript 何使用 GAE 在线      更新时间:2023-09-26

我想在GAE服务器上保留正常的html/javascript代码,但在页面显示期间

self.response.out.write(template.render('templates/page.html', template_values))

它应该被混淆。我该怎么做?有现成的工具吗?

对于Javascript,该过程不称为模糊处理,通常称为压缩。

工具:

r.js

http://requirejs.org/docs/optimization.html

YUI压缩机:

http://developer.yahoo.com/yui/compressor/

请注意,混淆HTML是没有意义的。另外请注意,这并不能阻止人们阅读您的代码,只会使阅读速度变慢。