10 ms·
> Ship less JavaScript posted on a site shipping 456.1KB of packed JavaScript
by yunolisten 10y ago
> Ship less JavaScript
posted on a site shipping 456.1KB of packed JavaScript
- M4v3R 10y agoGood point, but to be fair, author probably doesn't have any control over this, as this is default for all Medium blogs. It's another question why Medium decided it is a good idea to ship almost 80k lines of Javascript code for a page whose only purpose is to display a blog post.
- yunolisten 10y ago> author probably doesn't have any control over this, as this is default for all Medium blogs The author made a statement > Ship less JavaScript They chose to post on medium, they could have posted the content anywhere. They chose to give us the above lesson, while ignoring it. Do as I say, not as I do. > it's another question why Medium decided it is a good idea to ship almost 80k lines of Javascript code for a page whose only purpose is to display a blog post. Who cares? Why not simply stop using such shitty services?
- panorama 10y agoRelax, friend. The majority of people are not freaking out over this. Surely you have better things to do than nitpick about this and call other people's products shitty. I recommend choosing to be more positive instead. Have a nice day.
- yunolisten 10y agoNobody is freaking out about anything in this thread. I'm pointing out legitimate facts, contrary to some of the other comments. Reality isn't nitpicking. And yes, it's a shitty product. And don't worry, I'm multitasking.
- always_good 10y agoWhen you find yourself replying to every branch of a thread, it's time to take a break.
- yunolisten 10y ago> When you find yourself replying to every branch of a thread I didn't, please check your facts. Once again someone tells someone not to do something they're not doing. Well done.
- tambourine_man 10y agoAnd yet another question is why would a technically apt person, and one obviously concerned with page optimization, choose to give up control of how their content is served.
- yunolisten 10y agoExactly: > Staff Engineer at Google working with the Chrome team Obviously they have the resources to self host in a sane manner.
- thehardsphere 10y agoJust because the author works at Google doesn't mean that "they" had anything to do with the blog post. It doesn't follow that "they" would allow their resources to be used in that way, and it also doesn't tell us anything about what the more time efficient choice for the author is.
- yunolisten 10y agoYour jump to conclusions mat is showing some terrible signs of wear
- M4v3R 10y agoIt's probably a mixture of potential impact (Medium posts will always be much more popular and easier to find on Google than some static page he could set up) and ease of publishing (just write the article and publish it, versus managing your own blog platform), plus some added bonuses (sharing widgets, analytics, etc.).
- yunolisten 10y agoNope, google already have various technical bogs and corporate pages, which (unsurprisingly) rank well on their search engine.
- thehardsphere 10y ago
- Jakob 10y agoInterestingly enough this is one of the websites where deactivating JavaScript results in a much _bigger_ payload (mostly because images are eagerly loaded without JavaScript and lazily with JavaScript activated). - Bytes transferred without JavaScript: ~2MB - Bytes transferred with JavaScript: ~600kB
- yunolisten 10y ago> Interestingly enough this is one of the websites where deactivating JavaScript results in a much _bigger_ payload No. If you have JavaScript on and scroll through the article the page load is 2.8MB.
- amdavidson 10y agoTrue, but the driving force of TFA is about the time it takes to get to interactivity. Loading 1.2MB less out of the gate is going to help that significantly.
- yunolisten 10y agoPlease show your working. Downloading >400KB, unpacking it, parsing it, running it is always faster across the board than just downloading the images? Interactivity? Please, I can scroll the page without the images or vast amount of JavaScript being loaded. What gain has interactivity on this article? How does your point related to the fact that there's a vast amount of JS in the page, where the author tells us no to do so.
- dualogy 10y agoIn what browser does eager image loading interfere with "interactivity"? Let's face it, they know most readers probably don't read/scroll to the end so it saves transfer costs on a decent scale --- which is fair enough. "Half a megabyte of packed JS" still sounds way overkill for delayed image loading.. =)
- sosuke 10y agoI deactivated JS and got a 240KB payload finished in 1.58 s. Chrome 56.0.2924.87 (64-bit) I scroll through the page and no more data is transferred. I guess what I'm curious about is how you see images at all since I don't get them unless JS is turned on.
- dalore 10y ago> At the median, developers shipped 410KB of gzipped JS for their pages. Well I guess Medium isn't far from the median.
- joshfarrant 10y agoWell done.
- bartread 10y agoI had to laugh at this but, and I'm not making excuses for Medium here, that is sadly lightweight compared with a lot of sites on the web. Still, the "ship less JavaScript" comment rings true: people need to stop cargo-culting all the things into their front-ends. It's colossally annoying at the best of times, and the more-so when you're browsing over a 3G connection. You can basically forget using a lot of websites nowadays if you haven't at least got 3G, and plenty aren't that great on anything less than a 4G connection.