[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: fix-javascript-bloat-1.png (128 KB, 810x535)
128 KB
128 KB PNG
What makes a website appear snappier than another?

Sometimes a page will load fast but stutter all over the place.

Are there elements you should avoid when creating a website to improve the user experience?

How does the average person guage the performance rate of a webpage? Any way to benchmark specific tabs?
>>
>>108235024
https://developers.google.com/speed/pagespeed/insights/

I've heard that 40% of people will abandon your website if it takes more than 3 seconds to load.
>>
>>108235024
>Are there elements you should avoid when creating a website to improve the user experience?
Javascript.
>>
>>108235024
>What makes a website appear snappier than another?
Not using a JavaScript framework.
>>
>>108235163
If only Google practiced what they preached.
>>
>>108235163

Frankly 1s should be the goal. Nobody likes spending time on a clumsy site.

Start with the bare minimum and only enhance as necessary. A pure HTML/JS site can still look gorgeous while being lightning fast.
>>
At bare minimum, a web page is HTML. This has a very small data footprint by itself and can be transmitted quickly, especially if you utilize CDNs and caching to the max (servers that sit near your user so that it can send things to them the fastest).

Usually this isn't enough, so people use HTML + JS. JS adds more data overhead, and takes some time to execute some small methods usually, so your footprint is now getting a bit bigger. But this can still be a very lean site, and frankly it's near impossible to do without JS if you want anything other than the plainest static site possible. So I'd consider HTML + JS the real bare minimum for peak performance with near max capability.

At this point, you're probably serving images and video as well, which are some of the most data heavy objects to send to your user (and take more time), this is where CDNs/caching become critical, otherwise you will get delays as a 10 MB image is sent for instance.

Now how most of the web works is an additional layer on top of this: JS frameworks. Angular/React/Vue/etc. These are intended to make it easier to work with JS, keep your code better organized, provide tooling and ways to make a dynamic site. But they come at a cost: even more data overhead. And they tend to encourage TERRIBLE practice with developers as they load their new "app" (we've now graduated) with endless libraries and dependencies intended to save them some time. This is where you start to see pages go from 50 kb, to 100 MB, and where you see modern delays.

Some of the big players can get away with framework bloat, since they have endless money for giga servers, CDN networks, multiple caching layers and vectors, and dedicated data engineers that can optimize the backend too. But 80% of them can't, and are still trying to ape the methods of the big players, and that's where you get slow junk. Kids trying to play with big boy toys but lacking the required muscle and acumen. Slow fucking website.
>>
>>108235024
>What makes a website appear snappier than another?
Minimal javascript
>Sometimes a page will load fast but stutter all over the place.
Because of using shitty placeholders that are then populated by javascript, common in bloated javascript frameworks
>Are there elements you should avoid when creating a website to improve the user experience?
Javascript
>How does the average person guage the performance rate of a webpage? Any way to benchmark specific tabs?
If it jumps around while loading, or takes more than a second to load (excluding media), it's shit

Javascript frameworks were a mistake
>>
I forget the exact size but there's a certain number of kilobytes that make instant load times.
>>
>>108235024
No js frameworks
>>
>>108235758
Yeah I remember this from /wdg/
https://endtimes.dev/why-your-website-should-be-under-14kb-in-size/
>>
File: test.jpg (85 KB, 1384x666)
85 KB
85 KB JPG
>>108235163
sounds about right
>>
>>108235024
I am in the process of creating a website for my small business and it's a challenge to keep it small. I do need some basic javascript for carts, checkouts, filtering, etc. Will probably be shipping something like 30kb gzipped over the network which sounds like a lot to me because i know there isn't much in there.
>>
>>108235024
the better your systems hw acceleration capabilities the faster it is. this is why macbooks & androids destroy windows in browser tests because they use vulkan instead of directx.
>>
>>108236910
But what about HTTP/3 over UDP?
>>
>>108235024
Not bombarding visitors with "verify you're not a bot" captchas and similar crap.
>>
File: 1592582740617.jpg (88 KB, 851x929)
88 KB
88 KB JPG
>>108235024
just like everything else in computers. it becomes slower if it has more things to do. it becomes faster if it has less things to do or if it does it more efficiently.
>write efficient algorithms
>don't use bloated meme js libraries
>lazy load assets
>don't use bloated meme js libraries
>if a complex computation is required, run it in a web worker or wasm. just keep it outside the main thread. and of course, do not use it inside an event that fire rapidly
>don't use bloated meme js libraries
>>
>>108235024
what is a `web-page`
how does an entirely objective purview of `snappyness` finds itself a invisible shinigame that is neither cpu neither gpu nor user error.
That `not-snappy` to `snappy` slider is simply
user-incompetence.
>>
>>108235024
there are some tricks to make it feel faster like prefetch and preloading images
like this website does
https://www.youtube.com/watch?v=-Ln-8QM8KhQ
>>
>>108235183
/thread
>>
>>108236981
what about it? the transport protocol being more efficient won't do shit to the amount of bloat usually found in modern websites.
>>
>>108236964
/Thread
>>
>>108235024
chrome based browsers have the lighthouse test. it will tell you what you can optimize to improve the speed.
>>108235183
>>108237447
>>108235217
wrong



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.