[HN Gopher] WebKit Features in Safari 16.4
___________________________________________________________________
WebKit Features in Safari 16.4
Author : om2
Score : 156 points
Date : 2023-03-27 17:56 UTC (5 hours ago)
(HTM) web link (webkit.org)
(TXT) w3m dump (webkit.org)
| musicale wrote:
| I hope they fix the "Never Auto-Play" setting some year.
|
| Obnoxious autoplaying video is a scourge.
| lagrange77 wrote:
| Still no WebXR support :(
| prophesi wrote:
| Yep, that's what I was hoping for as well. :/
| yanis_t wrote:
| Pretty big deal for PWA. Now we can send push notifications, and
| update app badges.
|
| Now if we could get periodic background sync api, and vibration
| api, that would be perfect.
| starik36 wrote:
| Only for web pages that user has manually added to the home
| screen. Since normal users don't even know what that is, I
| don't see this as pushing the PWA envelope forward.
| waboremo wrote:
| This is one of the integral features that prevented a lot of
| places from even creating PWAs. Now that it no longer exists
| as a problem, PWA adoption will increase and alongside it
| education. For example, many places are probably going to
| show a "add to home screen" banner, with related icons to
| make it easy for people to find where that setting is. Kind
| of like how many "normal users" in the past would have been
| scared about downloading a new browser, but now when you
| download a new browser it shows you the next steps on how to
| do so (most of us don't even think about these anymore, but
| they exist and are important).
|
| A next major step is inclusion into the app store, but until
| then this is a major win for PWA.
| sccxy wrote:
| I tested some features on my PWAs.
|
| New wake lock API does not work in PWA, only works in Safari...
|
| Apple is making sure that nobody will use PWAs.
|
| https://whatpwacando.today/wake-lock
| JayStavis wrote:
| The release notes for 16.4 include "Added Support for the
| Screen Wake Lock API"
|
| https://developer.apple.com/documentation/safari-release-
| not...
| sccxy wrote:
| Yeah, but "bugs" happen and this new wake lock only works
| in browser safari.
|
| Does NOT work in PWA. Bug or intentional road block?
| illiarian wrote:
| > Apple is making sure that nobody will use PWAs.
|
| Ah yes. The amount of random APIs that are an absolute
| necessity for something to be called the true PWA just keeps
| growing with every release.
| jensimmons wrote:
| If there is a bug, we will fix it. Bugs can be reported at
| https://bugs.webkit.org. We would never intentionally prevent
| web technology from working when a site is added to the Home
| Screen and opened as a web app.
| sccxy wrote:
| > If there is a bug, we will fix it.
|
| https://bugs.webkit.org/show_bug.cgi?id=254545
|
| https://bugs.webkit.org/show_bug.cgi?id=249645
|
| Thanks!
| ladon86 wrote:
| I disagree with the Chrome comment, but how about decoupling
| Mobile Safari upgrades from OS upgrades?
|
| It would be nice for all users to get access to these new APIs
| via a simple app update. This would allow developers to actually
| start using them within days/months rather than years.
| yamtaddle wrote:
| The built-in webkit is used extensively in apps. Tying it to
| the OS release makes testing and development a whole lot
| easier.
| mepian wrote:
| Is it very difficult to ship two versions of it, one "stable"
| in the OS for embedding, and another in an app?
| yamtaddle wrote:
| Then you have to have two copies of the program, on disk
| and, at least at times, in memory. And they behave
| differently, which might be confusing. And all kinds of
| handoff scenarios and edge cases get potentially-weird.
|
| Meanwhile, how many users would sacrifice any amount of
| stability or even just disk space to get somewhat-quicker
| releases of browser features? I'm guessing the percentage
| may very reasonably be rounded to zero. It's not even close
| to being urgent enough to be worth any amount of risk or
| extra resource use, IMO, as someone who conceivably _might_
| care about it, and the vast majority of users are even less
| likely to give a damn than I am.
|
| So: _why_? Maybe I 'm unusual, but it's been a really long
| time since I saw a new browser feature and was like "holy
| shit, this is amazing and I don't know how I browsed the
| web without it!" I can wait a few months for a browser
| update, it's really not a big deal.
| illiarian wrote:
| That's what they originally did, and developers complained
| that in-app browser wasn't getting the same features as the
| main browser
| babypuncher wrote:
| Make it an option for developers. They should be able
| choose between an OS-provided "stable" webkit, or the
| Safari-provided "evergreen" webkit.
|
| You could even make it so that the stable option is
| automatically used as a fallback if Safari isn't
| installed, if that ever becomes an option.
| NegativeLatency wrote:
| or just ship both at the same time so it's nice and
| simple
| concinds wrote:
| Android's webview is updated separately from the OS. Is that
| a problem in practice?
| yuters wrote:
| For a developer, it exists already as a simple app update:
| https://developer.apple.com/safari/technology-preview/
|
| Edit: Sorry, missed the part about the "mobile" safari. You're
| right, I don't think it's available for mobile.
| benatkin wrote:
| It also wouldn't matter much to me if developers could
| upgrade. What I would want is for users of my app to be able
| to upgrade when prompted.
|
| Fortunately the cutoff I've chosen for my current project
| isn't that bad - 15.4. It means some iPhone users won't be
| able to use it. Eventually I'll feel OK about requiring 16.4.
| But I second the request for being able to install a new
| version without upgrading the whole OS.
| explaininjs wrote:
| Looks like I might finally have a reason to upgrade my iPhone 7!
|
| Web Push is fantastic for developing useful applications without
| paying the apple tax, which necessarily results in the garbage-
| tier free apps dominating the App Store today (Want to do
| anything at all? Watch an ad every minute. Want functionality
| that's not the absolute bare minimum? Pay $5/month forever.)
| scarface74 wrote:
| Free apps are not using ads because they need to fund their $99
| developer fee.
| explaininjs wrote:
| I ain't publishing any utility apps for free if I have to
| pay. I have made plenty of utility websites I use as Home
| Screen apps though, all without ads.
| lozenge wrote:
| There are good apps out there written by casual people,
| they just can't spend the time and money on making their
| app easy to find.
| scarface74 wrote:
| Do you not have any hobbies that you pay for?
|
| When I was deep in the C# ecosystem, I personally paid for
| my own JetBrain license.
|
| Do you also not pay someone to host your web apps?
| sccxy wrote:
| It is not only $99.
|
| It is $500+ (used) computer also.
|
| Cannot use your old PC do develop iOS apps.
|
| $99 may be nothing for most HN users, but for 3rd world
| developer...
| true_religion wrote:
| I'm a third world developer. In the third world, at least
| in Ghana, iPhones are over represented in the middle
| class and by association many people have MacBooks.
|
| This means there is a glut of older models in second hand
| market or passed down to kids, cousins, and family
| friends.
|
| The problem with the 99 dollars is that it's payable
| yearly. Yes someone might sponsor you once and give you
| enough for a single year but they won't do it ever year.
| You have to make enough yourself and that's a tall order
| of business if you are a student.
|
| Thus no one learns iOS development first.
| explaininjs wrote:
| I use Cloudflare free tier and am trialing Fly.up free
| tier for always-on servers as needed (websockets, etc.)
| krono wrote:
| Paying for the privilege of getting to fill gaps and
| solve problems on my device operating system that the
| recipient of those payments who also happens to control
| said device and operating system refuses to resolve or
| has even purposefully introduced. Yeah, no thanks.. I'll
| pass.
| scarface74 wrote:
| So are you saying that Apple should produce any app that
| anyone ever might need?
|
| Do you feel the same way about console makers?
| krono wrote:
| That's not at all what I'm saying, you are putting words
| in my mouth.
|
| "I'm not paying for the privilege of..."
|
| Edit: A continuation of the above but paraphrased from my
| previous comment: ...being allowed to step over this
| ridiculous barrier to implement these fixes myself on my
| own device.
| david2ndaccount wrote:
| Simd128 for wasm is a big deal, safari was the last major browser
| to not support it.
| jjcm wrote:
| I've been waiting on that update to ElementInternals for years
| now - this was one of the main blockers to really allowing for
| accessible webcomponent form inputs.
|
| Really excited to see some cool custom form inputs, and for those
| will inevitably say "use the native form elements, dont make your
| own!" I agree _when that 's an option_, but often times you do
| want custom form inputs (i.e. a video uploader form element that
| allows you to define crops / cuts / etc). This will open up the
| options for things like that, and will result in some great
| custom experiences that are also accessible.
| rvz wrote:
| Here comes the web push notification spam avalanche going onto
| iOS.
|
| The SaaS grifters will metastasize, multiply and deliver their
| snake oil as they did to Android now onto iOS users only to
| degrade the platform further.
| s1k3s wrote:
| All you have to do is click "No thanks".
| tinus_hn wrote:
| You can of course choose not to add web apps to your Home
| Screen.
| gkbrk wrote:
| Can't wait to see stuff like this everywhere.
|
| "To pay your phone bill, please add the T-Mobile web app to
| your Home Screen."
|
| "To read the rest of the article, please add the News web app
| to your Home Screen."
| the_gipsy wrote:
| You already have this, it's called native apps.
| CharlesW wrote:
| Two thoughts:
|
| (1) For this to work at all, users will need to have added the
| app to their Home Screen.
|
| (2) Because they "work exactly like notifications from other
| apps", you can easily control when they're able to interrupt
| you, and also easily mute abusers.
| rabuse wrote:
| Acting like most apps don't already bombard us with crap on the
| regular... this is not a webapp issue.
| carlycue wrote:
| It's time for Apple to retire WebKit and adopt the Chromium
| engine, just like Microsoft. Apple is clearly not interested in
| making a competitive browser in 2023. Also, go watch unboxing
| videos on YouTube where people unbox MacBooks. The first thing
| the vast majority do is download Chrome. Data cleary shows that
| when the platform is open and fair, Chrome is the preferred
| browser by consumers. Apple is stifling competition and harming
| their consumers on iPad and iOS by not allowing competition.
| Apple knows when they open the gates, Chrome will take over the
| iPhone and iPad and Safari will fizzle out.
| kitsunesoba wrote:
| > Data cleary shows that when the platform is open and fair,
| Chrome is the preferred browser by consumers.
|
| I think this data is somewhat tainted by how many things have
| been developed and tested thoroughly against Chrome only,
| resulting in subpar performance or nonfunctionality in other
| browsers. Rather than users downloading Chrome because that's
| what they prefer, I suspect a great many do it because that's
| the most surefire way to avoid bugs and sluggishness in the
| many front end codebases that are tuned almost exclusively for
| Chrome.
|
| It's similar to how Netscape suffered because developers
| increasingly developed against IE only in the 90s. People want
| the web to "just work".
| airstrike wrote:
| Notwithstanding the issues with your argument, which have
| already been raised by others in their replies, I wanted to say
| I'm puzzled to find people still preaching about Chrome when
| Firefox is just as good these days if not better
|
| It's like people switched from Firefox to Chrome a while back
| and never came back to see how great it is
| illiarian wrote:
| > It's like people switched from Firefox to Chrome a while
| back and never came back to see how great it is
|
| That is exactly what happened
| Tsiklon wrote:
| As much as I hate that no other browser engine is allowed on
| iOS, browser engine monoculture is toxic, and overtly caustic
| to the open web as a whole. Safari officially adopting Blink
| would have wide rippling effects beyond Apple's own ecosystem.
| It would likely also sound the death knell for Firefox in it's
| blast radius.
|
| This would surrender web standards as a whole to Google, who in
| my opinion, cannot be trusted to equitably shepherd this
| forward; given their propensity to push their own browser
| heavily, push non-standards forward and so adversely affect
| their own sites on rival browsers who do not use their
| extensions to the specifications.
| concinds wrote:
| I would have said this exact thing two years ago. But Apple's
| since proven that they can make a good browser, if they try
| hard.
| illiarian wrote:
| > But Apple's since proven that they can make a good browser,
| if they try hard.
|
| It was a good browser two years ago, and it still is a good
| browser.
|
| Pushing every Chrome-only non-standard API does not a good
| browser make.
| drawfloat wrote:
| Apple should open up and allow other browsers, but they
| shouldn't just adopt Chrome themselves. Aside from throwing us
| back to the days of a browser monopoly, relying completely on a
| service provided by Google is becoming an increasingly
| questionable decision.
| dimator wrote:
| on the one hand, a browser engine monoculture is going to be a
| disaster for the standards-based internet (if it's not already
| a disaster).
|
| on the other hand, apple crippling webapps with a half-assed
| browser so that they can sell apps and rent-seek also sucks.
|
| i'm glad safari exists, but for the wrong reasons. it's such a
| tragedy that there are not more for-profit browser companies.
| illiarian wrote:
| > apple crippling webapps
|
| Of course apple isn't crippling them.
|
| On top of that you have the world's most popular OS with none
| of the perceived crippling, and we've yet to see a single
| amazing web app on that OS.
| sccxy wrote:
| Apple IS crippling webapps.
|
| They just released new Wake Lock API, but it only works in
| browser Safari. It is broken in PWA...
|
| QA cannot be that bad they do not test PWAs for new
| features.
| illiarian wrote:
| > Apple IS crippling webapps.
|
| Of course it isn't. Unless you can come up with a non-
| random list of things of what constitutes a PWA.
| Everytime someone screams about Apple not doing something
| in PWAs, that list is different.
|
| Meanwhile, as I said above, there's an OS that holds
| about 70% of the world's marketshare that has none of
| this "crippling" as you put it. And yet, there are
| literally none of these amazing PWAs there that Apple
| supposedly cripples on their OS.
|
| Something tells me, the problem doesn't lie with Apple.
| sccxy wrote:
| Just because you do not like PWAs does not mean there are
| not amazing uses of PWAs.
| illiarian wrote:
| > Just because you do not like PWAs does not mean there
| are not amazing uses of PWAs.
|
| Talk is cheap. And yet in all these discussions no one
| ever says "ho, look, over there in this amazing OS with
| no restrictions that has 70% of the world's market there
| are these amazing PWAs, just look at them!"
|
| It's always complaining about some absolutely random API
| that absolutely must be there on iOS for the PWA to
| finally happen (even if it exists on that other OS).
| sccxy wrote:
| As I said, there are more people in the world than you.
|
| There are other opinions also.
|
| I know it is hard to accept it.
| illiarian wrote:
| See how there's still zilch about the amazing PWAs on
| Android.
|
| But sure, do tell me how it's "just my opinion".
| sccxy wrote:
| My most useful PWAs are local websites. City transport,
| government websites etc.
|
| These sites never make their own native app because they
| cannot afford to maintain those apps.
|
| Websites and PWAs are great and cheap compared to apps.
|
| But it is not hard to google?
|
| https://www.monterail.com/blog/pwa-examples
| illiarian wrote:
| > But it is not hard to google?
|
| The question about hard-not-hard to google.
|
| Always in discussions about Safari you will find someone
| complaining about "Apple crippling PWAs" and coming up
| with yet another random APIs that they absoluely need to
| finally make a great PWA.
|
| Always in these discussions I hint that Android is 70%
| worldwide market share, and has none of the perceived
| restrictions on PWAs. Surely these amazing PWAs that
| Apple doesn't allow should exist there. Right? Right?!
|
| And invariably there are crickets.
|
| Even your "example" are literally "we made our site not
| suck and open faster, this increased conversions, yay!
| It's all because of PWAs".
|
| Of course it's not. Correlation is not causation. If your
| page load went from 3s to 0.9s (Washington Post) or is
| now 4x faster (BMW), it's not really PWA who's
| responsible for people staying on your website. Oh, you
| pushed your bloated abomination of a website into offline
| storage on users' phones and now the site opens faster?
| Yay (not)!
|
| And then there are egregiously bad takes like "Thanks to
| PWA Telegram's platform cna be accessed from different
| devices". Newsflash: Telegram's _native apps_ are
| available across different platforms
| rvz wrote:
| > Chrome is the preferred browser by consumers. Apple is
| stifling competition and harming their consumers on iPad and
| iOS by not allowing competition. Apple knows when they open the
| gates, Chrome will take over the iPhone and iPad and Safari
| will fizzle out.
|
| Correct. Chrome has already won. No contest. Undisputed.
| [0][1][2]
|
| The moment Apple opens up the competition to other browsers,
| Chrome dominance will essentially be further entrenched. The
| digital markets act will just guarantee this further.
|
| Google might as well make Chromium a independent standard
| organization maintaining a standard browser engine.
|
| [0] https://gs.statcounter.com/browser-market-share
|
| [1] https://www.w3counter.com/globalstats.php
|
| [2] https://www.statista.com/statistics/268254/market-share-
| of-i...
| illiarian wrote:
| > Google might as well make Chromium a independent standard
| organization maintaining a standard browser engine.
|
| In all honesty, they are already doing that. They are
| shipping 400 new APIs a year. Imagine how many of them are
| standard.
| zapt02 wrote:
| Do you see any problems with there only being one browser
| engine that is relevant?
| [deleted]
| olliej wrote:
| I agree, we should all be using IE6 as it's clearly the engine
| everyone is using and competing with it is a waste of effort /s
| Fauntleroy wrote:
| Absolutely not. Chromium needs as much competition as it can
| get.
| jw1224 wrote:
| I've been building websites for 10+ years, and still prefer
| Safari as my daily browser. I switched over from using Chrome
| full-time 5 years ago.
|
| Compared to Chrome it's anecdotally faster, objectively more
| power-efficient, and on par with Firefox for privacy.
|
| I don't know why you think Apple's uninterested in making a
| "competitive" browser. It's been years since Safari didn't
| support something I needed it to do, and I'd consider myself a
| power user.
| pdnell wrote:
| I've been building websites for 10+ years as well, and I
| can't tell you how many hours I've wasted on workaround to
| make something trivial work in Safari that required no work
| in other browsers. I've also run into some pretty gnarly
| animation performance issues over the years.
|
| That being said, Apple has clearly upped the focus on the
| browser in the last two years, and they are shipping a ton
| more features and fixes in each update, so kudos to them for
| refocusing as of late.
| nwienert wrote:
| If you develop for Safari first you will feel the exact
| opposite: you'll get it working perfect in Safari only to
| have to frustratingly deal with tons of issues in Chrome.
|
| I think it was objectively true that Safari was lagging 3
| years ago, but in the last two years in terms of standards,
| Safari is equal or better. Safari feels much faster in
| practice for quite a while.
| ttfkam wrote:
| https://9to5google.com/2023/02/28/chrome-safari-battery-
| life...
| nwienert wrote:
| I'd like to see third party benchmarks. But beyond battery,
| there's a fluidity to Safari that is simply unmatched by
| Chrome. I'm talking about stuff like: back/forward, tab
| open/close, resize window, scroll, quit/reopen. Also a
| native feel in general that makes it especially nice, like
| text selection and the various elements.
| EGreg wrote:
| What is the best way to maintain a session cookie when a web app
| is added to home screen?
|
| Right now I take people to a secret URL with long generated token
| so the web app will also have it and be able to correlate the
| two. Yes I can have the user re-sign-in with credentials, or
| webauthn, but seems overkill.
|
| Also can Apple add some sort of thing like Chrome has
| "beforeinstallprompt" to actually show an install promopt?
| happybuy wrote:
| Yet another huge update of features to Safari, building upon the
| great progress they made last year in:
|
| - leading on the Interop 2022 dashboard results [1]
|
| - posting the best Speedometer score on the Mac [1]
|
| - changing their pace of innovation and releases to deliver newer
| API features in a quicker manner
|
| [1] https://www.magiclasso.co/insights/triumph-of-safari/
| jiripospisil wrote:
| I would really like to give Safari a chance but I just cannot
| get over the fact that there's no support for more advanced ad
| blockers. Sticking with Firefox/Brave for now.
| sparker72678 wrote:
| What do you get with advanced ad blockers? I'm using 1Blocker
| on Safari -- what am I missing out on?
| danhau wrote:
| Things like blocking ads in YouTube videos, I guess.
| daniel_iversen wrote:
| There's an extension for Safari called Vinegar who does
| this, and due to how Safari works it works on both
| desktop and mobile!
| pulvinar wrote:
| Have AdGuard for Safari and see no YouTube ads (or
| anywhere else).
| omnimus wrote:
| You might like Orion from Kagi. https://browser.kagi.com/
| stephenr wrote:
| ... what do you mean by "more advanced"? The
| default/efficient approach with Safari is content blockers
| (i.e. a precompiled list of url patterns to block in the
| engine itself), but extensions can also include javascript
| too.
|
| 1Blocker - a well known 'traditional' safari content-blocker
| - does this for example, to provide ad blocking on sites like
| YouTube.
| warning26 wrote:
| I've found that AdBlockers on Safari don't work well at
| all. I have 1Blocker on my iPad, and not only does it fail
| to block YouTube and many other ads, it also seems to slow
| down Safari and induce crashes + memory leaks.
| wdb wrote:
| 1Blocker works fine for blocking YouTube. Are you sure
| you have the `1Blocker Actions` and `1Blocker Scripts`
| extensions enabled?
| stephenr wrote:
| I have to admit I don't use 1Blocker for YouTube ads. I
| use Vinegar, which isn't strictly speaking an _ad
| blocker_ - what it does is replace the custom YT player
| with a native platform player (i.e. regular controls you
| get with a plain <video> element)...
|
| this has the side-effect of removing all Youtube ads,
| _and_ you get familiar controls for the video player.
|
| I can't say I've seen any issue with performance or
| crashes due to 1blocker being active, on phone or Mac (I
| have on my iPad too but dont use that device any where
| near as much as the phone/mac)
| [deleted]
| kevincox wrote:
| That is a bunch of features that solve problems I have margin-
| trim, lh and :user-valid will all allow me to improve code in my
| projects. Unfortunately they aren't supported anywhere yet
| (except for :user-valid on Firefox). I would love to see the
| other browsers roll out support.
| happybuy wrote:
| Am excited about the support for the :has() selector for Safari
| Content Blockers. It will enable a lot of sophisticated blocking
| of page elements based upon characteristics of the child
| elements.
|
| For example, in a feed of post where one post has a 'sponsored'
| text element, the :has() selector could be used to easily target
| the full sponsored post while leaving organic posts untouched.
| pfista wrote:
| Apple releasing support for web push was a big reason I decided
| to build an API for sending push notifications to PWAs.
|
| Relatively easy to work with, though I hope their OS integration
| will add support for more native iOS notification features like
| actions.
|
| If you wanna try out native push notifications it's pretty fast
| to try out: https://alerty.dev
| jagged-chisel wrote:
| Is there a trial or free tier to try out? I'm only seeing
| options to pay $5 to see if this could fit my workflow.
|
| Edit: on the account page, it says "You're currently on the
| free plan." But I can't do anything with notifications.
| s1k3s wrote:
| Every time a non-chromium browser pushes updates it's good news.
| That being said, if you care about open standards, privacy and a
| fair market, you should just delete whatever you have and install
| Firefox right now.
| illiarian wrote:
| > That being said, if you care about open standards, privacy
| and a fair market, you should just delete whatever you have and
| install Firefox right now.
|
| I wonder if you realize that these days Firefox is more often
| than not on Safari's side when it comes to all the things
| you've listed.
| s1k3s wrote:
| How's that?
| illiarian wrote:
| On privacy, APIs etc. Firefox backs Safari in their attempt
| to stop Chrome from just barging ahead
| thedanbob wrote:
| Nice to see Apple giving some love to web apps. One feature (bug
| fix?) that I've been wanting for a long time is the ability to
| autofill from my password manager in Home Screen web apps on my
| phone. Autofill works in Safari, but once I turn a site into a
| Home Screen app it no longer appears. But only on my phone, iPad
| it still works.
|
| Edit: Looks like someone may have already reported it 3 years
| ago: https://bugs.webkit.org/show_bug.cgi?id=210061
|
| > The space for the saved accounts is there, yet the text is
| empty. There's nothing to select
|
| Sure sounds like what I'm seeing, except instead of being
| intermittent it's _always_ like that.
___________________________________________________________________
(page generated 2023-03-27 23:00 UTC)