Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share icons #181

Open
ForNeVeR opened this issue Jul 29, 2016 · 5 comments
Open

Share icons #181

ForNeVeR opened this issue Jul 29, 2016 · 5 comments

Comments

@ForNeVeR
Copy link
Member

Well, guys, maybe we should add a share icons such as bash.im does? It looks like that:

image

Sharing the links that way is much more convenient than copy-pasting the links to the social network manually (because their UI is so complex so it seems that you can navigate it only after acquiring your first PhD degree; in particular, I cannot navigate it at all).

@Minoru
Copy link
Member

Minoru commented Jul 29, 2016

I won't vote for or against this, but I'd like to make a note: these buttons ping an external service every time they're displayed. This affects both user's privacy and site's performance.

Performance: downloading an image—even checking if the cached version is still valid—requires a DNS lookup and establishment of a TCP connection (plus possible TLS tunnel). That's two to three RTTs, not counting the time it takes servers to process the queries. Also, browsers cap the number of connections at 6 per tab.

Privacy: there are users out there—me included—who don't want to let social media know of every little thing we view online. Unfortunately, downloading an image does just that.

Please consider using Social Share Privacy or something similar if you decide to add these buttons.

@ForNeVeR
Copy link
Member Author

I see no reasons for these buttons to ping any external services to be displayed. If they are then it's just wrong. Our buttons definitely shouldn't do stuff like this.

@ForNeVeR
Copy link
Member Author

ForNeVeR commented Jul 30, 2016

Also there's a couple of points about your whole networking/RTT thing.

  1. In today's web, count of images displayed != count of images loaded from the server. We could either compose them to sprite or even embed them into CSS to make no additional HTTP requests at all.

  2. In today's web, count of images loaded != count of separated HTTP requests, TLS sessions etc. With HTTP/2 (and I'd like to enable it maybe in future for all of our services: loglist, ctor) you can download multiple files in a single request, and the server can advertise resources he recommends to be downloaded by client ahead of time.

  3. In yesterday's web, count of images loaded != count of TCP connections made. Ancient HTTP/1.1 offers persistent HTTP connections (and we're using HTTP/1.1). I am not completely sure how to check if we have this mechanism enabled, but I think it is, i.e. there is no connection overhead for some of the requests:

    image
    (timings taken from Firefox network console while accessing loglist resources)

Also you should check my initial image again. Look, there're no any social counters that would require us to go to any external server to show them. These are just images, no more. bash.im itself loads them (all in one request) from Yandex Share Service, but we don't have to.

@Minoru
Copy link
Member

Minoru commented Jul 30, 2016

I see no reasons for these buttons to ping any external services to be displayed. If they are then it's just wrong.

Good. Now I can be sure it will be implemented properly. Thanks.

My points regarding performance and privacy were written with default button implementations in mind. They all involve you injecting a snippet that will download an image and some JS code from external server—separate and different for each social network, so the number of TCP connections established is pretty much equal to the number of social networks out there. I was fearing you might go that way too, hence my note.

@ForNeVeR
Copy link
Member Author

I think we understood each other. We're not going to make any shits here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants