Debian – 所有浏览器jquery压缩都会破坏所有js,但是未压缩的工作正常

在debian linux中使用诸如opera或chome之类的浏览器时,页面会加载js错误。 这不会发生在任何其他浏览器中,事实上我甚至无法重现它,但另一个用户可以在他的系统上的几乎每个浏览器中重现它。

错误是:

[12/07/11 19:08:22] JavaScript - http://demo.phppointofsalestaging.com/js/jquery-1.6.1.min.js Linked script compilation Syntax error at line 2 while loading: ,"*":"*/**/*;q=0.01":""):d.accepts["*"]) --------------------^ expected '}', got ':' [12/07/11 19:08:23] JavaScript - http://demo.phppointofsalestaging.com/index.php Inline script thread Uncaught exception: ReferenceError: Undefined variable: $ Error thrown at line 1, column 0 in http://demo.phppointofsalestaging.com/index.php: $(document).ready(function() [12/07/11 19:08:33] JavaScript - http://demo.phppointofsalestaging.com/js/jquery-1.6.1.min.js Linked script compilation Syntax error at line 2 while loading: ,"*":"*/**/*;q=0.01":""):d.accepts["*"]) --------------------^ 

这只有在jquery缩小时才会发生,否则就不会发生。 这令人难以置信。 SeaMonkey出错

单挑……

http://bugs.jquery.com/ticket/10153#comment:2

您的minifier错误地将QUOTED字符串中的/ *视为多行Javascript注释的开头。 请不要用破碎的minifier来制作快乐有趣的JQUERY; 而是使用code.jquery.com或任何CDN上提供的正确缩小版本。

  • jQuery Bugs团队
Interesting Posts