Debian - all browsers jquery compressed breaks all js, but uncompressed works fine

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 01:39:10

问题


In debian linux when using a browser such as opera or chome the page loads with a js error. This does not happen in any other browser and in fact I cannot even reproduce it, but another user can reproduce it in almost every browser on his system.

The errors are:

[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["*"])
--------------------^

This only happens when jquery is minified, it doesn't happen otherwise. This is mind boggiling.


回答1:


Just a heads-up...

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

Your minifier is incorrectly seeing the /* inside a QUOTED string as the beginning of a multi-line Javascript comment. PLEASE DO NOT TAUNT HAPPY FUN JQUERY with a broken minifier; instead use the properly-minified version available at code.jquery.com or any of the CDNs.

  • jQuery Bugs Team


来源:https://stackoverflow.com/questions/6680244/debian-all-browsers-jquery-compressed-breaks-all-js-but-uncompressed-works-fi

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!