

Mobile Safari's Performance Is Not the Problem - tjvantoll
http://tjvantoll.com/2015/07/27/mobile-safari-performance/

======
dilap
Forget about mobile, modern web sites suck everywhere, desktop included.

Giant banners that stick along the top of the screen. Infinite scrolling that
(1) leaves all elements loaded, severely limiting the amount you can scroll,
and performance as you scroll deeper and (2) breaks the back button and (3)
breaks bookmarking and link sharing. Click-interceptors that ruin the ability
to command click to open in a separate tab. Shitty attempts at navigation
transitions that ruin the Safari's built-in Back w/ swipe transition.

Not to even mention the ungodly amount of intrusive ads on many sites.

And God help you if you have flash enabled.

~~~
AJ007
I don't advocate using the law to enforce web standards, but if websites all
followed disabilities standards it would be pretty straightforward to strip
out all of the extra stuff. You could just browse the web painlessly in Lynx.

It could be a lot worse. Misuse of HTML5 and WebGL could leave users wishing
for Flash. Publishers are just scratching the surface for how poor web
usability could be. Like really fucking bad. Prediction: we will see some hard
sell porn sites make breakthroughs in this area first.

There is some humor in hitting a "mobile friendly" website and desperately
requesting the desktop version because its such a pile of shit. Many
newspapers have fallen in to this trap. Even companies that should know
better, like AirBNB have had issues in the past (can't comment now because I
haven't looked in a few months.) Ironically if your company is data driven and
doing a lot of front end testing, your winning design that converts users in
to app installs may be doing just so because it is broken.

As someone who has a decent number of users in developing countries I'll point
out these problems compound themselves abroad. Users are on older phones,
Android or Blackberry, broadband is limited, and resolutions are much lower.
There are publishers and startups who are failing in other markets because
their designers only test locally, may be not even on a real phone. You can't
make the excuse that eventually everyone will have high DPI iPhones, because
by the time they do, the first tier devices will be that much better and you
will be developing for them instead.

~~~
snowwrestler
> I don't advocate using the law to enforce web standards, but if websites all
> followed disabilities standards it would be pretty straightforward to strip
> out all of the extra stuff.

In the U.S, the Department of Justice is responsible for enforcing the
Americans with Disabilities Act (ADA). The ADA does include language on web
accessibility and the Dept of Justice has repeatedly signalled that it
believes that that language applies to basically all publicly accessible
websites.

They are working on a new rule to clarify that, but its release has been
delayed until April of 2016. But in every case so far, their standard has been
the Web Content Accessibility Guidelines (WCAG) 2.0 at Level A or AA. [1] So
basically, right now it's looking like the law will in fact begin enforcing a
web standard in the next year or two!

[1] [http://www.w3.org/TR/WCAG20/](http://www.w3.org/TR/WCAG20/)

------
TazeTSchnitzel
As someone pointed out on Twitter, the reason The Verge and others are getting
upset about "Mobile Safari" may be Apple's upcoming introduction of Safari
Content Blockers, which would deprive them of advertising revenue. By
badmouthing Safari (for something which isn't its fault), it can get people to
switch to Chrome, which won't have ad-blocking on iOS.

This is hypothetical, of course.

~~~
bunderbunder
I think that argument could be made without the conspiratorial angle, too. The
Verge and others are probably grumpy about Safari because of that, and that in
turn makes them more eager to bad-mouth it.

------
jbob2000
The mobile browsers aren't the problem, the content (read: advertising) is the
problem. Loading tons of ad images and tracking scripts is what makes it
shitty.

~~~
revscat
This is, I believe, the more correct answer. There are so many different
assets being delivered for every URL that it degrades the performance of
desktop browsers, let alone mobile ones. HTTP/2 will help somewhat, but the
overarching problem -- megs of cruft for every KB of content -- will remain.

~~~
amelius
I read somewhere that the new Safari will have an adblocker, so that would
solve this, I guess.

~~~
soylentcola
It may not address the underlying issues with ad-based revenue for websites
but at least for performance, it does make a big difference. Adblocking
extensions have been available on other platforms for a while now and they're
one of the main reasons I use Firefox as my primary mobile browser (albeit on
Android instead of iOS). I can install the same Adblock Plus/Edge/etc. as the
desktop version and immediately my little 5" screen is less cluttered, sites
load faster, and I use less of my metered data plan.

Mobile web browsing without an ad blocker is miserable compared to the same
thing on desktop. At least on the desktop you've probably got 1920x1080 or
2560x1440 screens, more processing power, more RAM, and a connection that
offers more than 5GB of data each month. With mobile it's unbearable.

------
exelius
Building ad support into the browser sounds like a great idea, except it's not
strategically a good idea for any of the browser vendors. There's a constant
struggle between advertisers, publishers and browser/platform developers for
data -- not to mention a huge conflict of interest with Google (and to a
lesser extent Apple).

The reason ad networks are so bloated is because web advertising as it
currently stands has a measurement problem: if I display an ad, I have no way
of knowing if a reader even saw it. This is why you rarely see ads displayed
below the fold; and when they are, they're wrapped in a bunch of JavaScript or
Flash to ensure they're not tracking displays for ads that were never seen.
Advertisers literally want pixel-level tracking of page scroll, mouse
movement, etc. and they use all this bulky JavaScript to collect it. Do you
think it's a good idea to let the browsers report this information? Because if
not, the advertisers are going to inject as much JavaScript as they can to use
every workaround to collect as much data as possible.

This also ignores the fact that Google is the head honcho of online
advertising. Google can (and probably does) collect much of this information
from inside Chrome. They would be violently opposed to sharing this data with
their competition, because proprietary data like this enables them to charge a
premium for ads they place. Advertising is all about proprietary data sources,
and the moment something becomes commoditized it loses most of its value.
Considering Google makes something like 95% of its revenue from its network of
proprietary user data, they would never engage in any sort of browser ad
placement unless it funneled money through them (which their competitors would
never go for).

~~~
rogerbinns
There is a great chart showing the categories of players involved, as well as
the companies: [http://www.lumapartners.com/lumascapes/mobile-
lumascape/](http://www.lumapartners.com/lumascapes/mobile-lumascape/)

At the left are the advertisers, and the right is the end user. In between you
can see so many boxes with lots of logos. The sheer number of companies is
what contributes to so much of the ad "weight".

Even if the browser had some sort of overview, the players before wouldn't
just hand over control. For example Verizon would want to control what happens
to users on their network (and already do so).

~~~
exelius
This chart is the gold standard for describing the ad tech market, but I
actually think it is a bit myopic with regards to the "full-stack" view.
You're thinking of a strategic control point, and the networks aren't in as
good of a position as you would think. Things like SSL limit their ability to
perform segmentation via DPI -- but since browsers are the SSL termination
point, it's not nearly as much of an issue. With security becoming more and
more important and "SSL everywhere", the networks' ability to collect data
from ad networks through DPI is disappearing.

Typically, strategic control points should be thought about in terms of their
physical proximity to the user. That is, if it is a device that the user
touches, that device and its software stack represents a potential control
point. Currently, the devices aren't the control point (thanks to Google's
Android strategy), but the OS and by extension the browser is much more
promising. If I had to describe a value chain, it would look like this (you
can replace "browser" with "app", though with a much more limited scope):

User > Device > OS > Browser > Network > Publisher > Ad tech (most of what is
shown in the chart above) > Advertiser

Basically, every company on this chart is trying to disintermediate every
other company to the right and left of them. What we're left with is a
reasonably efficient advertising marketplace that serves the needs of
advertisers and publishers, but the tricks and methods used by advertisers are
frustrating to users. The browser vendors have enormous control over what
techniques can and can't be used to implement ad tech -- the reason Flash
hasn't been removed entirely is because Flash-based tracking cookies offer far
more information than the browser, especially with regards to video ads.
Google hung on to Flash for a long time because of YouTube, but I think
they've recently realized that if they can get Flash off of the web, it would
hurt their competition more than it would hurt them.

------
mschuster91
Recently I had to develop a video overlay in html5 - a text that tweens
together with a html5 video.

Wasn't a problem with performance - even an aged iPad1 was able to fluently do
all the movement, translations etc.

What forced us to choose the ridiculously expensive option of server-side
prerendering with After Effects was that iOS Safari is unable to play a HTML5
video inline on iPhones and thus cannot be overlaid with a Canvas.

Fuck you very much, Apple.

~~~
untog
I ran into the same issue trying to use a video as a texture in WebGL. Worked
beautifully on desktop, mobile and even in an iOS UIWebView with inline video
allowed. But in Safari? Nope.

I do get the reasoning why it was done when the iPhone 1 came out, but come
on. Everyone ends up using animated GIFs instead, which just chew up more
bandwidth.

------
aylons
How is Google Contributor working? I could use it with an US credit card (even
though I live in Brazil), but I am still very afraid of enabling it, disabling
my uBlock for Google, being tracked and continuing to see most ads, specially
the most obnoxious ones.

However, I believe the idea to be a very good one. If Google guaranteed no ads
at all, on their site or in other site, I would compromise giving them this
tracking, as the their interests on my personal data interests would likely
change if the commercial part of the deal is out of the table. However, this
demands no adverts at all, and no selling of personal information at all. Hard
to see Google going for it.

~~~
Klathmon
While Google Contributor is a great first step (currently i'm using it with a
$7 a month contribution), it doesn't really help that much.

It only applies to adsense, and they already have pretty strict rules on ads
that make them pretty painless (only 3 per page on desktop, 2 per page on
mobile, and some pretty strict guidelines on where they can be placed and how
they can be shown).

Still, i see the "Thanks for being a contributor" pretty frequently, and the
ability to not only see an overview of where and how much of my money is going
places, but also to "disable" certain sites from getting any of my contributor
money is exactly what i've been wanting for a long time.

So this won't help any websites which already use "excessive" ads as they
aren't (or shouldn't be) using adsense, but instead are using more invasive
networks.

------
tempodox
_... reading content on the mobile web can be less than ideal ..._

That must the understatement of the year for the last five years. In fact, my
Mobile Safari feels so broken (functionally, not performance-wise), I do
mobile browsing only in an emergency.

~~~
vardump
Opera Mobile works, but sadly it's only available for Android. Only mobile
browser that can handle full desktop sites without excessive horizontal
scrolling, most of the time well enough desktop versions become preferable to
"mobile" versions. Not to be confused with rather useless Opera Mini.

~~~
gtk40
When I was last on iOS, I actually preferred Opera Mini. This was before
Chrome, etc. were options and I have barely used iOS since then, but it was
much faster, and had saner zooming.

------
bobajeff
It goes on to say it's the performance of mobile browsing and mobile networks
that are a problem. Because ads and other cruft abuse resources which is more
noticeable when your browser only holds 30kb cache and your network is 3G.

------
vbezhenar
I always wondered, why websites don't deliver ads integrated? Why Google
Analystics can't use server-side data? I don't want my user to load any
unnecessary JavaScripts, if all data is already available in nginx logs. Why
should my user issue additional HTTP requests to Google Ads, when I can issue
those requests at server-side (and they'll work faster, because server
interconnectivity usually is very good) and deliver the single complete web
page to user, with all ads included. Images might load faster from different
hosts now, because browsers might restrict connection count to the single
host, but in HTTP/2 era single host with single connection will work faster,
so loading ad images from website server will be faster too.

The only difference is how easy to integrate ads to your site. Adding <script>
tag is certainly easier than tweaking server-side logic or setting up nginx
module. But it doesn't matter for big sites, yet they employ the same
technique, making their sites unnecessary slow, especially for low-bandwidth
users.

~~~
Retric
Google does not trust sites as many will fake their numbers to make more from
Ads. If Google directly talks to each user's IP it's much easier for Google to
tell that each page load was a real page load.

In your approach they are stuck trusting the webserver and it's far easier to
add fake page loads, this is somewhat less of an issue with PPC, but there are
still issues.

On top of that advertisers want to track each user which is far simpler when
it's a separate HTTP request.

~~~
vbezhenar
> Google does not trust sites not to fake their numbers. If Google directly
> talks to each user IP it's much easier for Google to tell that each page
> load was a real page load.

If we're talking about Google Analytics, the user wants to view correct data
in the first place.

> In your approach they are stuck trusting the webserver and it's far easier
> to add fake page loads, this is somewhat less of an issue with PPC, but
> there are still issues.

That's true.

> On top of that advertisers want to track a user which is far simpler when
> it's a separate HTTP request.

Webserver is supposed to send all necessary user's data to Google server (like
IP, UA, Cookies) and Google might ask Webserver to set google-specific Cookie.

Cross-site tracking won't be possible, that's true. Probably some standard
could be invented for that (e.g. Google signs global inter-site cookie to
deliver to the user and browser should send this cookie to all Google-enabled
sites). That'll make easier for user to disable tracking, if user wants that.

My point is that if Google doesn't want to improve their scheme, may be other
advertising company will want to improve that scheme. And Google might realize
that users will follow that company, that's what competition is about.

And probably Google itself is not the evil here. There are many other ad
networks with huge banners and slow loading scripts.

~~~
glass-
Google Analytics had a self-hosted version, or more specifically Google
Analytics was a self-hosted solution when it was Urchin before Google acquired
it.

You could still get the self-hosted version for a price until Google killed it
in 2012.

The reason Google doesn't want you to do this is simple: they want the data.

------
zobzu
I find it interesting that no one picks on the phone being as fast as the
laptop. Its not exactly true either and the phones are fast but not that fast.

Its a mix of safari perf, Network latency, memory, cpu/bus... And of course
the biggest contender, the website itself.

In the past a slow app would be blamed for being poorly written. Now its as if
you cant write poor js.

------
taf2
For me the greatest limitation of mobile safari is the lack of WebRTC. Being
able to bring and develop communication focused applications via a server side
application would be amazing. The web platform has countless advantages to a
native only environment.

1\. rapid application deployment

2\. immediate fixes to address real world issues.

3\. easier a/b testing push tests remotely and easily collect these updates.

4\. it's freaking easy to develop html/css/js applications - the browser
vendors put a lot of time an energy in testing html/css/js rendering over a
huge number of use cases

5\. it's cross platform it runs in more than mobile safari.

IndexedDB is another one - if mobile safari or rather just safari had a
working implementation of IndexedDB some interesting offline applications
would be possible.

------
INTPnerd
Regardless of whether or not most developers are upset about Safari's
performance, most users would very strongly welcome a faster web browser. I'm
pretty sure speed, stability, and ease of use are the main reasons Chrome is
such a popular browser on the desktop. The thing is, it is not really that
much faster than other browsers. However, even that small difference feels
like a big difference and wins over many users. I'm sure many developers are
aware of this. You can't get away from the fact that only allowing one browser
rendering engine has some strong disadvantages and is one of if not the
biggest disadvantage of using iOS.

~~~
MBCook
> I'm pretty sure speed, stability, and ease of use are the main reasons
> Chrome is such a popular browser on the desktop.

Unfortunately they don't seem to care about efficiency. I know numerous people
who have given up on Chrome (on Mac, don't know if Windows is better) because
using Safari keeps the laptop's fans from spinning up and gives them an extra
few hours of battery life.

~~~
AlphaSite
That is one of the main reasons that I stick to firefox and safari for my
browsing needs. The extra battery goes a long way (and chrome's poor tab
handling).

------
untog
Performance of which Safari? My biggest problem is that webviews in
Facebook/Twitter use a UIWebView that doesn't have the Nitro JS engine. That
absolutely hammers performance. If you have a lot of traffic coming from
social and are testing in Safari proper, you're not testing in the environment
your users are experiencing your site.

Apple have released the WKWebView but last I checked it has a number of
bugs/errors that make it very difficult to use.

~~~
MBCook
It's AMAZING what a difference that can make, which really just shows how
terribly written the JS on most sites is. It's often faster when pulling up an
article in Twitterrific to have it open in Safari than to try to let it finish
'loading' in the web view.

No page should have so much JS (for ads and such) that without a hyper-fast JS
engine it feels like it stopped loading.

~~~
untog
_which really just shows how terribly written the JS on most sites is_

IMO, not necessarily. I was playing around with a D3 visualization that ran
terribly within the UIWebView, there was really very little I could do about
it.

But I won't argue that plenty of sites are overusing JS for rendering etc when
they should be leaving that to static HTML.

~~~
MBCook
Visualizations and demos and games and such make sense to me. But when the
page has finished loading and looks like every other page of text with some
image ads? Yeah you didn't need that JS did you.

------
vlunkr
I think what we need to make the web better are new ways of advertising. Sites
like The Verge depend on ads, and currently that means lots of requests and
extra js which both hurt the experience, as the author pointed out. Which
leads to people browsing with things like ad blockers and Ghostery. I'm no
expert on the subject, but there are certainly better ways to advertise than
plastering sites with videos and giant banners.

------
stevenhubertron
Interesting that this article saying pretty much the opposite came across my
twitter today in regards to the network: [https://medium.com/@TwinPrime/why-
mobile-app-performance-is-...](https://medium.com/@TwinPrime/why-mobile-app-
performance-is-unreliable-c7241e458757)

------
Touche
I don't remember what the number is, but mobile browser performance is a
fraction of that of desktop browsers and the number hasn't changed much in the
past 5 years.

This is worrisome to me because if it means we've tapped out on ARM
performance then we need to look to a future without ARM on mobile.

~~~
kitsunesoba
I disagree. Mobile performance is fine; modern smartphones and tablets provide
more than enough power. It's enough power to be able to churn through huge
photo libraries and power surprisingly capable video NLEs and multitrack DAWs;
why should any website ever need more power than that?

No, what we should pursuing much more fervently is browser engine optimization
and more efficient JS. I've always been a strong supporter of baking more
functionality found in commonly used JS libraries into JS itself (allowing
aggressive optimization and reduction of number of libraries loaded) and while
I may be wrong, I suspect that the web could benefit greatly from dependency
sharing systems (if [lib] is already loaded from one source, don't try to load
it again).

And of course, nothing will have as much impact as thoughtfully written JS.
There needs to be a big push in the web community to take responsibility for
performance because expecting browser developers and increasing hardware power
to magically make everything OK isn't a solution.

------
MrDosu
This article really belongs in a private conversation or a comment.

When I open an article I am really looking for original content, not some "I
disagree with this other dude" evangelism.

