TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Opera Rejecting Extensions With Minified Code

44 点作者 gantengx超过 11 年前

17 条评论

zerovox超过 11 年前
This doesn&#x27;t seem wildly unreasonable to me. If it allows them to perform a better review and check for malicious code before approving it, I&#x27;m all for it.<p>Perhaps Opera can perform the minification after reviewing the code and achieve the performance gains while still being able to prevent malicious code entering the store.
评论 #6409953 未加载
评论 #6409942 未加载
olalonde超过 11 年前
There is a lot of cargo culting going on in this thread. There are 2 reasons to minify Javascript code:<p>1) Protect your intellectual property by obfuscating code<p>2) Make web pages load faster by reducing the size of the Javascript file(s) to transfer<p>Minifying an extension won&#x27;t make it run faster since extensions are loaded from memory or disk, not from the network (ok, maybe it will be faster by a few nanoseconds?). It could make the initial download of the extension faster but it&#x27;s only a one time download. Therefore, the only valid reason to minify an extension would be #1. However, it seems Opera is more concerned by user security (it&#x27;s much easier for a backdoor to go undetected in minified code) than protecting the IP of extension developers.
评论 #6410393 未加载
评论 #6410407 未加载
byoogle超过 11 年前
Actually, I think Opera has the same policy as Mozilla. If you reply to the reviewers (who are very responsive), they seem to let you minify as long as you show them the unminified sources.<p>Our extension (<a href="https://addons.opera.com/en/extensions/details/disconnect/" rel="nofollow">https:&#x2F;&#x2F;addons.opera.com&#x2F;en&#x2F;extensions&#x2F;details&#x2F;disconnect&#x2F;</a>) uses the minified versions of seven libraries, which are about half the size of the unminified versions. Why not give users a better experience by shaving a few seconds off the install time?
评论 #6410907 未加载
Yver超过 11 年前
Ideally, I&#x27;d want every store to reject minified code but at the same time I&#x27;d want them to automatically minify extensions while making their full sources available as a separate download.
评论 #6410284 未加载
dools超过 11 年前
I don&#x27;t think that minifaction will have an impact on execution time or memory usage will it? It&#x27;s only advantageous to reduce total size of downloaded code, and total number of web requests to retrieve all the assets required for the page. I wouldn&#x27;t think either of those things would matter in a browser extension.
PhasmaFelis超过 11 年前
I&#x27;m glad I&#x27;m not the only one who thought &quot;good for Opera.&quot;<p>Obfuscated code is for competitions, not functional software. This is not 1978; the space savings from single-character variable names is not significant. (Or if it is, your code is way too heavy to be running in a browser extension.)
评论 #6410128 未加载
jfoster超过 11 年前
The Opera store looks incredibly similar to the Chrome Web Store, even down to the effect used to show more information when you hover over a tile.<p><a href="https://addons.opera.com/en-gb/extensions/" rel="nofollow">https:&#x2F;&#x2F;addons.opera.com&#x2F;en-gb&#x2F;extensions&#x2F;</a> compared with <a href="https://chrome.google.com/webstore" rel="nofollow">https:&#x2F;&#x2F;chrome.google.com&#x2F;webstore</a>
richo超过 11 年前
Did they actually do any kind of benchmark to see if it affects performance?<p>The memory and parse time argument is invalid imo. Lexing a file with wildly abudant whitespace is going to take a delta longer that&#x27;s insignificant compared to the parse time.<p>Loading it is normally a concern because of network bandwidth and latency, especially if it&#x27;ll push you over MTU.
jorde超过 11 年前
Mozilla does the same thing for Firefox extensions but the experience is much worse thanks to volunteer reviewers. This is of course not consistent and your extension can get rejected based on whatever obscure reason they might have: I once got hate as I used spin.js instead of a GIF loader animation. Believe me, Opera has it good.
otikik超过 11 年前
Their house, their rules. And they don&#x27;t sound so crazy to begin with.
sitkack超过 11 年前
Extensions should be in the clear so we can see them. There is ABSOLUTELY no reason to minify an extension, they get downloaded once. In this scenario minification == obfuscation == something to hide.
antocv超过 11 年前
&quot;Is Opera saying they will do a comprehensive code review on every line of extensions submitted to their store? Will they require documentation on all design decisions and processes involved? What about any server-side code?&quot;<p>Well, duh, yes they will do their best even if they may fall short. Props to Opera.
serge2k超过 11 年前
The code is stored on device correct? Minifying makes no sense.
评论 #6409807 未加载
SchizoDuckie超过 11 年前
Rejecting it for it might be a bit over the top, but I can imagine that minifiying and linting is just a part of your regular development process.<p>However, minifying is useless if there is bandwidth overhead (read: file:&#x2F;&#x2F; URLs.)<p>I&#x27;m really sad though that there&#x27;s even in the JS community people that are promoting micro-optimisations like they do in the PHP world..<p>Opera could just de-uglify the code (and even automate that). still a non-argument to decline a deployment IMO.
V-2超过 11 年前
If this is important, why couldn&#x27;t Opera itself minimify the code when an extension is added?
abcd_f超过 11 年前
&gt; Is Opera saying they will do a comprehensive code review on every line of extensions submitted to their store?<p>Clearly, no. But they do probably want to check if your js might be pulling on some funny URLs behind user&#x27;s back.
jnardiello超过 11 年前
+1000 points for Opera.