10 ms·
It seems weird to focus so much on es2015 features, when so many of them are polyfillable (not optimal, sure, but still) when there is such uneven support for D
by pfooti 9y ago
It seems weird to focus so much on es2015 features, when so many of them are polyfillable (not optimal, sure, but still) when there is such uneven support for DOM (and related browser) API features in safari.
I mean, where are service workers? Give me a nice, cross-platform way to handle offline-first and I'll be happy. But hey, it isn't like there's some kind of browser monopoly on iOS or anything, like there was in windows.
- kevin_thibedeau 9y agoThere never was a browser monopoly on Windows just a bunch of tech illiterates who don't seem bothered by MS's "monopoly" with notepad.exe or anti-competitive moves like taking away the ability to use an alternate graphical shell. Only one popular consumer OS has prevented the installation of alternate browsers and everyone looks the other way.
- pfooti 9y agoI'm not entirely interested in relitigating a past I literally lived through. On the other hand, it is objectively true that there is only one browser platform for iOS. WebKit or nothing. If they actually supported chrome or Firefox instead of requiring them to be wrappers on webkit renderers, I would not have this complaint. Of course, the reason this isnt being taken up by anti-trust folks is that iOS doesn't dominate the market the way windows did. So: i guess the answer is to convince my users to stop buying idevices. Whee.
- alwillis 9y agoOf course, the reason this isnt being taken up by anti-trust folks is that iOS doesn't dominate the market the way windows did. So: i guess the answer is to convince my users to stop buying idevices. Whee. No. Monopolies themselves aren't illegal, especially when they're natural monopolies. It is illegal for a company to use its monopoly to stifle competition in other, unrelated markets. The classic case is Microsoft using its monopoly in operating systems when Windows had 95% marketshare in the emerging browser market. Remember that Microsoft threatened to cancel HP and Compaq’s Windows licenses if they continued to ship Netscape Navigator instead of IE. That's illegal. It's not illegal to have a rules and guidelines for a platform a particular company owns. Game consoles are way more restrictive than the iOS App Store and nobody is suing them.
- millstone 9y agoHow do you feel about ChromeOS?
- pjmlp 9y agoI am so glad people can use another browser on ChromeOS, oh wait...
- lern_too_spel 9y agoThe difference is that it was technically infeasible to run another browser on ChromeOS, not policy infeasible. The technical infeasibility was recently removed. https://www.google.com/amp/www.techrepublic.com/google-amp/article/4-alternatives-to-the-chrome-browser-on-chrome-os/ https://www.google.com/amp/www.techrepublic.com/google-amp/a...
- pjmlp 9y agoNo difference at all, in regards to the end user experience, but Google tends to have a green card from HN crowd.
- lern_too_spel 9y agoIf I really wanted to, I could have built another browser using PNaCl and run it and distributed it on ChromeOS even before it supported Android apps where users trivially have access to other browsers. That remains impossible on iDevices to this day. If you can't see the difference, you are only deceiving yourself.
- mcphage 9y ago> Only one popular consumer OS has prevented the installation of alternate browsers and everyone looks the other way. iOS doesn't prevent the installation of alternate browsers. It prevents alternate browsers from running their own HTML renderer. Preventing alternate browsers might be legally actionable if Apple had a monopoly; preventing alternate HTML renderers is decidedly not.
- pizlonator 9y agoES6 features are faster when natively supported and natively optimized like in JSC.
- pfooti 9y agoYay. Now let me build a progressive web app for iOS and I will care about javascript perf on that platform. Speed is great and all, really great for some people. I just wish they had different priorities.
- bla2 9y agoThat's cool, but it feels a bit like making sure your room is tidied up while your house is on fire -- it's not clear it's the most pressing priority. But webrtc support is cool.
- pizlonator 9y agoMy house is definitely not on fire. That much I can tell you. My room, on the other hand, is definitely not tidy. Haven't cleaned that shit in ages.
- jfbastien 9y agoYour office is pretty tidy though. But seriously, we have a bunch of developers asking for JavaScript improvements. Maybe OP doesn't want them, fine that's useful feedback... but it would be more easily received if it came in a nicer package :)
- zajd 9y agoI'm pretty sure Safari's features are intentionally crippled to keep their app ecosystem safe. See: web notifications.
- alwillis 9y agoI'm pretty sure Safari's features are intentionally crippled to keep their app ecosystem safe. See: web notifications. I’m pretty sure you'd be wrong. Apple announced that it's paid over $70 billion to app developers since the App Store became a thing in 2008 at today's WWDC keynote. This is the 30% Apple pays developers; so we're talking about $233 billion in gross transactions in less than 10 years. Apple is likely to be the first trillion dollar valuation company; I seriously doubt it's worried about web apps encroaching upon a fairly small part of it's revenue: http://fortune.com/2017/03/31/apple-trillion-dollar-company/ http://fortune.com/2017/03/31/apple-trillion-dollar-company/
- untog 9y agoI think that's a shortsighted way to look at it. The iPhone is as successful as it is because of the perception of exclusivity - the best, newest apps will always be on iPhone first. Whether they are free or cost $100 each doesn't really matter that much - it still means Apple is the premier mobile device bar none. If they enabled more progressive webapp features, we'd start to see a lot more cross platform webapps. That would not be in Apple's interest.
- alwillis 9y agoThe iPhone is as successful as it is because of the perception of exclusivity - the best, newest apps will always be on iPhone first. That argument might have worked in back in the day when the iPhone was only available on AT&T but not in a world where the iPhone is available to more people than it ever has been before. The iPhone is perhaps the single most successful product ever, with over 1 billion sold: http://www.asymco.com/2016/07/28/most-popular-product-of-all-time/ http://www.asymco.com/2016/07/28/most-popular-product-of-all... The total marketshare of Android is around 2 billion, but that's the total of Samsung, Motorola, HTC, LG, etc. None of them have individually sold a billion Android phones themselves. If they enabled more progressive webapp features, we'd start to see a lot more cross platform webapps. That would not be in Apple's interest. Do you think Apple cares more about selling a $700 iPhone or a 99¢ app? They have over a million native apps for iOS; what keeps that ecosystem strong is how Apple is able to innovate each year on new features for the iPhone, iPad and iOS, not by restricting what web apps can do. The most compelling features are things web apps aren't very good at anyway. I seriously doubt Tim Cook is losing sleep worrying about Service Workers and the like. People said the same thing about WebRTC and how it would compete with FaceTime. And now we have WebRTC in the new versions of macOS and iOS, so it's time to create reasons why other web features aren't there. Web apps have made a lot of progress but for the average user in a developed country, the user experience pales in comparison to native apps.
- threeseed 9y agoService workers are an anathema to everything Apple is trying to achieve with Safari and I would be shocked if it ever gets included. Their focus is on improving battery life, having a great user experience and maintaining a high level of privacy and security. Service workers are awful for all three. For example look at what you have to do to see running service workers: Developer Tools > Application > Service Workers chrome://inspect/#service-workers If there was a rogue web site launching service workers to do something nefarious how would I know diagnose what's happening ? How would my grandmother ? Where is the transparency the web is supposed to provide ?
- pfooti 9y agoSomething here about babies and bathwater. Service workers are pretty limited in what they can do. Is there UX work to be done? Sure. But the fundamental problem is that they fill a need that is not met at all by Apple, and not even in a silly "use metal instead of vulkan because reasons" kind of NIH but we'll support some other similar standard fashion, but in a "nope" way. So, kudos for the speedy es6. I'm still not going to tell people to use safari on macos, and I'm still going to build crazy DIY caches for safari on iOS because I can't do stuff with service workers in a standardized way.
- untog 9y ago> If there was a rogue web site launching service workers to do something nefarious how would I know diagnose what's happening ? What exactly are you supposing a service worker would be doing? They can't do huge downloads (the worker is shut down when there are no pages using it and it can only be reactivated by another browsing session or push message), can't receive push messages without showing a notification... there really is very little a service worker can do nefariously. It can, however, help improve battery life by allowing you to better control the offline experience, and not needlessly activate cell radios.
- rictic 9y agoThis is a misconception. Service workers don't sit in the background consuming resources and performing arbitrary tasks. They respond to events, typically to intermediate requests while a user is using a site. The service worker spec was carefully and deliberately designed to give the browser, not the site, control over resource consumption. The browser is allowed to stop any service worker at almost any time. See https://github.com/w3c/ServiceWorker/blob/master/implementation_considerations.md#event-driven-workers https://github.com/w3c/ServiceWorker/blob/master/implementat...
- MBCook 9y ago> I mean, where are service workers? Every discussion about anything in Safari on HN, even if not at all related, for the last year or two has included multiple people complaining about the lack of WebRTC. Now it's here and there is a new complaint /s I agree with threeseed that it probwont come and frankly I don't see why I'd want it (or web notification, or even WebRTC). They only seem to support the use case of replacing real apps with webpages which I don't want to do and makes no sense to me as an end user (I understand the freedom motivations).
- pfooti 9y agoWith service workers you can transparently intercept outgoing XHRs and replace their results with cached values. You can even do a cache race if you want (cancel the xhr if your cache returns first). This is a hugely important feature for making web apps work offline-first. I mean, it's also a big part of progressive web apps, which is the next thing I'm going to complain about. (I don't personally care much about webrtc, but I can see why people do care about it). The general point isn't about any one feature in particular. It is about a history safari has with not implementing (or half-heartedly implementing, as with indexeddb for so long) APIs that are important to making the web a useful platform. Reasonable people can disagree whether or not those features are good, but it seems basically true that my mobile web work is constrained by what iOS safari outright refuses to do, more than anything else.
- millstone 9y agoThis seems like a very strange API. Why do you need a proxy to intercept network requests coming from your own app?
- reitanqild 9y agoTo serve that requests from local storage if your device or the server is offline.
- millstone 9y ago