Hacker Newsnew | past | comments | ask | show | jobs | submit | sarego's commentslogin

As someone who just recently worked on reducing page load times these were found to be the main issues

1- Loading large Images(below the fold/hidden) on first load 2- Marketing tags- innumerable and out of control 3- Executing non critical JS before page load 4- Loading noncritical CSS before page load

Overall we managed to get page load times down by 50% on average by taking care of these.


Can someone who understands more about web tech than me please explain why images aren't loaded in progressive order? Assets should be downloaded in the order they appear on the page, so that an image at the bottom of the page never causes an image at the top to load more slowly. I assume there's a reason.

I understand the desire to parallelize resources, but if my download speed is maxed out, it's clear what should get priority. I'm also aware that lazy loading exists, but as a user I find this causes content to load too late. I do want the page to preload content, I just wish stuff in my viewport got priority.

At minimum, it seems to me there ought to be a way for developers to specify loading order.


That is actually the case today!

But it is an opt-in feature, which is not supported in older browsers.

In modern frontend development we are heavily optimizing images now. Lazy loading is one thing, the other is optimizing sizes (based on viewports) and optimizing formats (if possible).

This often means you generate (and cache) images on the fly or at build-time, including resizing, cropping, compressing and so on.


Is progressive image loading still a common thing? I'd guess for a lot of connections it actually hurts more than it helps - until you get to that fat image-heavy site.


Is putting all assets into a single png/svg to reduce total requests a dead practice now?


I guess http/2 support on CDN made this a useless (and tedious) optimization


There was also the issue on an ancient version of IE that it could only load a few requests at the same time.


Is putting all assets into a single png/svg to reduce total requests a dead practice now?

As someone who browses the source of a lot of commercial web sites, I can say it's still dead common.

There's been a lot of static about new technologies coming that will make this unnecessary, but that don't help anyone today.


Should be done only if you have to load lots of small images. If you want to render above the fold fast reduceassets there and load them directly.


It is not supported by Safari, too.


I suppose simple order in the HTML document would be a heuristic that works almost always, but due to CSS the order is actually not guaranteed. You need to download images before doing the layout first too as you don’t know the sizes beforehand.


It's not just CSS screwing up the order! On my own (simple) sites, I can see all the images I put on a page getting downloaded in parallel—with the end result being that pages with more images at the bottom load more slowly even above the fold.


That's what the width and height attributes on the img tag are for. They're hints. Things can be redrawn later. Although I think I've been seeing a lot fewer images on the internet lately, but they must be hidden with css.


I know. And I wish my static site generator of choice (Hugo) added the tags automatically to the HTML.

Would it be possible to download just the headers of images first to get the metadata?


It's still a decent amount of overhead to even make the request for those bytes.


You can code split React components and create loading tiers.

Facebook claims they're doing this with the facebook.com redesign, for example: https://engineering.fb.com/web/facebook-redesign/


Understandable but for most use-cases (if your images are hosted on a reliable CDN and are optimized) lazy load should work fine. Lazy load works based on the distance of the image from the viewport so it may not load too late.

Chromium based browsers now natively support lazy-loading.


Order in HTML doesn't necessarily correlate to what a person can actually see (it's also possible to load images using CSS or even JS).

You could wait for layout and then load, but that would incur another big penalty (especially on JS-rendered pages).


yes, there is already

<img loading="lazy" ... />

simply add the property to your html images and the browser will automatically load them when in the viewport (i.e. just the ones you actually see)

further details: https://caniuse.com/#feat=loading-lazy-attr

https://html.spec.whatwg.org/multipage/urls-and-fetching.htm...


But then they always seem to not come in until I scroll to them, which is too late and just means I have to wait even more! What they ought to do is download as soon as the network is quiet.


This is what lazy loading does. It doesn’t actually load images that are “below the fold”. Or at least that’s what it should do. Images should only load once your start scrolling down.


I wish 50% would be enough but some local news pages take 15 seconds after the last modernisation. And that is with ad-blockers...


Add to that a ton of un-cached images will run up against the browser concurrent connection limit(non-HTTP2) and cause queuing.. Now you have latency back in the mix between batches :/


The characteristics you describe probably apply to way too many people than you think. Even people who think they are otherwise.

For people really looking to go further than themselves there is no self-improvement script but books that look at the condition of the self.Maybe Seneca and Eastern Philosophy. The problem however is that just reading book/s are not going to get us anywhere far. Applying them and thinking over them helps. It doesn't however help 'improve' any of our day to day tasks, but frees our mind. However I believe these have the first principles of the self every person ought to know to get beyond the self.


I used to be an easily stressed person. I do get stressed even now but am acutely aware of it affecting the body and mind. I feel that a lot of people don't even know that they are stressed. It used to take many minutes of sitting still for my mind to relax. At that point some of my muscles would automatically relax. Only at that instant would I even become aware of it being tight the whole day.


Discovery channel is apparently following them. bit.ly/2psxTAs


What comes to mind is https://rotimatic.com/home/. They have been shipping roti/pizza makers for a few years now.



Go! and Go are two different languages. Read the last section of the wikipedia page for Go! listed above for their objections against Google for picking that name.


I bought my wife's phone bundled with Fi with interest free installments. However since I had to activate the phone itself using her email id the installments never happened they charged me the amount all together. I called support but they didn't help/ didn't know how to. I have never had to call them since then which helps.

I myself have a republic connection which IMHO opinion is very similar and has a very similar plan getting bandwidth from different carriers to operate. Republic is much better for some reason in terms of coverage and is cheaper as well.

Overall I am appalled by the cost of mobile data and internet in the USA compared to countries like India. Reliance JIO just changed the game in India with the unlimited data and every other provider was forced to up their game. Not seeing anything like that happening here.


What comes to mind is something called "zero budget farming" invented by in India by Subhash Palekar. This is basically an approach based on the premise that modern farming including Organic farming is killing the microbes and other beneficial organisms in the soil critical to sustainable agriculture. http://www.palekarzerobudgetspiritualfarming.org/zbnf.aspx


I read the previous post on this that appeared on HN a couple of weeks back. https://news.ycombinator.com/item?id=20282837

My 3 year old used to close her ears anyways when near any of these hand dryers but now i warn her when one is about to turn on.


Curious to know why that is. Would you mind expanding?


Because if we have not beginning, we have no purpose. If we have no purpose, this is all really for nothing. I am not arguing whether it is or not, or whether there is a beginning, but lets look at it this way... You woke up this morning, that was the beginning of this day at night you will rest. Now, lets say there is no memory or record of 'waking up' beginning, we therefor cannot anticipate an end and everything we do now may feel for some less meaningful. I don't really know. I am just expressing my under-educated overthinking take on it.


Countered the downvote because I’m interested in this line of reasoning. Could you expand on that? Why do you think having no memory of “waking up” to existence makes it less meaningful?

I'm reminded of the following quote by Alan Watts from The Way of Zen:

To the Taoist mentality, the aimless, empty life does not suggest anything depressing. On the contrary, it suggests the freedom of clouds and mountain streams; wandering nowhere; of flowers in impenetrable canyons, beautiful for no one to see, and of the ocean surf forever washing the sand, to no end.


I like that idea. I think the world is a beautiful place, and I think also that humans can be a beautiful species at the times they come together. What is that one quote? "All that wander are not lost." I believe we can find peace with our existence and mortality and its something we have to remind ourselves of that individually it is not forever, and how it will end in general is not yet perceived.


All of the worst things in human history have happened as a result of mob mentality or 'humans coming together'.

On the contrary, the only times humanity doesn't sap me of the will to live is when I'm dealing with people on an individual basis.

> All that wander are not lost.

I feel like you're misunderstanding that quote as well.

It's supposed to be "Not all who wander are lost" and it refers to loners, wanderers, vagrants and explorers that never settle down and 'plant roots'.

The idea being that there are plenty of people that exist like that and enjoy that way of life. Other people with families and steady jobs tend to look at them as if they are 'lost', without truly understanding what it is to walk the earth.


Not the parent, but it kind of makes sense: if a network cable has no beginning it definitely has no purpose.


That's actually a great analogy there. I will say I wasn't really vouching for that line of reasoning more than exploring my own thoughts about it and that was one route my mind went. I like to do that with deeper questions from time to time. I guess that with no..."sense of time" or understanding of our beginning we have a less accurate ideal of what our ending may be. However, there is one thing we know for certain is that we do die. At least our bodies do. What happens after that though is to be disclosed. So maybe only what we do between those two points is what matters anyways? And some may view that as if we are going to die anyways, what does it matter?


I think this is a correct line of thought to a point. There is not greater purpose, and if there is, it ought to be unlike any other form of purpose. Since in general purpose is built up -- you do some task for a purpose, and that purpose is a task in some greater purpose.

As far as individual contentment, it seems maybe the truest greater purpose is actually itself: the greatest purpose is to have a greater purpose that your everyday purposes are acting towards. This gives a consistent mechanism I think, but still incomplete, or is it? Its incomplete because the "why" of the greater purpose doesn't seem to emerge from it existing. But this was mentioned at first: the why is for individual contentment, or more technically, for positive consciousness, joy, happiness, love, whatever you want to call it. The sort of existence which when you are it, you don't need or care to ask about a greater purpose, because you can feel..you know, that you're fulfilling it.


I'm not seeing any purpose to humanity as it is.

What purpose are you seeing?


As biological organisms, notions of birth/death are hard wired into the lowest levels of our cerebral kernel which serves as the foundation for every higher level of consciousness. As such, we only have the fundamental architecture to perceive an existence that is (literally) grounded in a small gravity well, with all of our primary circuitry distinctly focused on what is in “front” of both in space and time. As organisms, we cannot directly experience time that preceded our own existence, we can only mentally model that experience through intuition. That works well enough for relating to the existence of other organisms and the physical world we share, but that relatability breaks down quickly at larger space/time scales.

Incidentally, though our individual multicellular existences may follow a birth/death cycle, the molecular information flow (DNA) that transcends our organismal existences may perhaps provide the closest approximation to a model necessary to conceptualize possible relationships between multiple space-times.

(I’m clumsily alluding to the blackhole/whitehole infinitely branching multiverse concept, with DNA playing the part of sub-atomic mass/energy primitives which encode the structure of new unidirectional space-times/universes in an endless phylogeny which ultimately still doesn’t get us anywhere closer to “where did it all begin?” but surely expands the scope of the investigation wide enough to buy us enough time to keep procrastinating... Ok, back to work.)

disclaimer: I only got a B in undergrad physics and have absolutely no clue what I’m talking about.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: