7 ms·
> Because it's faster. The whole point of the article is that it's not true. It's not the only article that disproves it, and honestly, it's not difficult to n
by TeMPOraL 7y ago
> Because it's faster.
The whole point of the article is that it's not true. It's not the only article that disproves it, and honestly, it's not difficult to notice it. Just go to any blog running off a static site generator; loading times of pure HTML webpages on good connection are so fast they whole thing outruns client-side page switches even if the page is already in memory.
- StavrosK 7y agoCase in point, navigation on my site is pretty fast (to me, at least) and doesn't use much JS at all: https://www.stavros.io https://www.stavros.io (I promise I'll reply to your email soon)
- jspash 7y agoI'll admit it is pretty fast. Assuming you are using a mouse. But keyboard navigation is non-existent. So you have to ask yourself is it worth it to go against decades of effort put in to standard web navigation for what gain? Obviously only you can answer that for your blog. I'm not having a go. But I will give you credit for the fact that it does work with Lynx!
- TeMPOraL 7y agoBy "keyboard" I assume you mean TAB-key-based navigation (I don't know of any other included in the browsers)? If so, it looks to me that links are in fact TAB-stops, but they're not being highlighted. It's something that should be solvable with a CSS adjustment.
- quazar 7y agoIf the links are not highlighted by default, then tab navigation is basically non-existent since I cannot see where I'd be redirected and I personally bother to write custom CSS only for the websites I visit very often. Is there an actual reason to disable highlighting? It lowers usability and accessibility, but I'm not sure what do you get in return?
- StavrosK 7y agoOops, I'll fix that, thank you. I'm assuming the designer thought it looked "better". Also I use Vimium so I never noticed, since that mode of navigation is much faster.
- extra88 7y ago> Is there an actual reason to disable highlighting? Some browsers, Chrome especially, show the focus outline when elements are clicked with a mouse and some people think it looks unacceptably bad. Focus-visible is a CSS property meant to solve that but it’s only supported in Firefox and requires browser heuristics to do the right thing. https://caniuse.com/#feat=css-focus-visible https://caniuse.com/#feat=css-focus-visible https://css-tricks.com/keyboard-only-focus-styles/ https://css-tricks.com/keyboard-only-focus-styles/
- yc12340 7y ago...also known as "directional navigation" — widely used by screen readers and browsers on Android TV or some Android Auto devices.
- TeMPOraL 7y agoAbout as fast as mine on my underpowered machine, and mine is plain HTML without much attention paid to optimizing it further. > (I promise I'll reply to your email soon) (Take as much time as you need; also, I didn't expect a reply over the weekend :).)
- arthurcolle 7y agoScrolling on the hamburger buttons is in my opinion much smoother on your site than on sites that force you to click their links in the page itself. I'll have to check out the source when I get home, its overall a great UX with a focus on functionality over form, but the form is still nice enough to get the job done!
- greenhatman 7y agoIt's not as fast as https://dev.to/ https://dev.to/, which is an SPA. I.e. client side routing.
- detaro 7y agoAnd it took me 2 minutes clicking around to break its idea of the page state. I am partially scrolled down the home page, and it just decided to deactivate scrollbars and the ability to scroll. A great example of how it's quite difficult to reimplement stuff that works perfectly well on traditional pages. (At least they seem to haven gotten rid of some of the dark patterns they had in the past, that's nice to see) EDIT: and within a minute more found another state bug :D Yes, you can make perfect SPAs, but many people fail and it's a good question if the effort required to do it properly is worth it.
- greenhatman 7y agoI've never found a bug on there, and I've been on it many times. I'd love if you can show me how to reproduce this bug. I just don't have this experience with SPAs breaking. I actually have no idea where it's coming from.
- detaro 7y agoIt doesn't happen 100 % of the time, but right now going to the homepage, clicking one of the listings in the "newest listings" box, and then returning to the homepage through the browser back button triggered it.
- nkurz 7y agoI am able to reproduce this bug with Safari on a Macbook. I clicked on an item in "newest", then quickly pressed Cmd-Left to return to the previous "page". The front page reappears, but I'm unable to scroll with arrow keys or trackpad. An additional press of Esc returns the expected functionality. It seems to be a fast and responsive site when it works, though.
- thinkloop 7y agoYour site is great and the perfect usecase for traditional links, but it's literally like 99% content, with very little markup. The difference is more stark on design heavy pages.
- aurelius83 7y agoSure, I mean all you're doing is basically loading up static content. In which case SSR HTML will perform just fine, but you do happen to use client side logic for your comments section which also makes sense to me. A SPA for your site isn't really the use case for SPA.
- ComputerGuru 7y agoYeah, but you force me to stare at blank spaces while your webfont downloads [0]. I guess I should be thankful you’re not using that font for the body text, too (most sites do!). [0]: https://imgur.com/a/FAX6BDW https://imgur.com/a/FAX6BDW
- adrianN 7y agoI just set browser.display.use_document_fonts to 0 in about:config.
- weego 7y agoThat's conflating two different issues
- TeMPOraL 7y agoIt's the same meta-problem, though: modern webdev practices involving adding gimmicks for no good reason that introduce extra complexity and resource use, and then adding even more complexity and resource use trying to fix all the expected behavior and features of browsers that the initial gimmick broke... and doing it poorly.
- kilburn 7y agoI hate all these gimmicks you are talking about (slow to load fonts, unnecessary videos, fucked up scrolling, spinners everywhere, etc.). That being said I challenge the assertion that they are used for no good reason. - Custom fonts are used because they help shape a brand. Properly used, the choice of fonts communicates a lot (at a subconscious level) about the company or person behind it. - Unnecessary videos unfortunately work (i.e., help grab and retain user attention). Not for me (quite the contrary!), but for the majority of people stumbling upon a company's website. - Same for weird gimmicks involving animations and what not. I can feel them draining my battery out and it phisically hurts, but most people like them and take away the impression that "this is a modern person/company". All in all, many website's primary goal is not to communicate factual information, but to capture user attention and/or communicate at a subconscious level, and gimmicky things work for that purpose :S
- teen 7y agothe article is wrong tho
- sangnoir 7y ago> The whole point of the article is that it's not true. Only for the narrow condition of loading a whole page. A lot of Web apps make async request much smaller than loading the whole page: imagine deleting one record in a list of 50 items; the async response could be the HTTP 200 header alone. I think it would be useful for developers to separate web applications from web sites and consciously make trade-offs (such as state management: for the projects I have worked on, adding "Undo" logic was far simpler with client-side state-management. YMMV)
- delinka 7y agoWeb apps making async requests should be making much smaller requests than loading the whole page - but they're not. They're loading a page and parsing out the "less than the page" bit to stick into the current page; or they're loading a JSON blob bigger than the current page to update the three visible elements on the page. Imagine Software Engineers that actually engineered solutions - the use of small async requests would be a boon to everyone! But no one's doing this. I know first hand of one company doing this nonsense with requesting a full JSON payload (describing the whole house that goes along with the proverbial kitchen sink), rather than requesting updates for the one property on the user's screen. I've proxy-sniffed at least two other, unrelated companies doing exactly the same thing.
- namibj 7y agoGraphQL was made to fix that issue.
- strken 7y agoGraphQL's nice if you want a third option to the choice between many bespoke endpoints or few generic endpoints, but if your problem is sending a list of 400 widgets with every single page load, then you have an easier and better way to increase performance sitting right in front of you.
- sangnoir 7y ago> They're loading a page and parsing out the "less than the page" bit to stick into the current page; or they're loading a JSON blob bigger than the current page to update the three visible elements on the page. This is...disgusting. I was speaking of applications I have personally worked on; the teams/organizations I have worked with were concerned about performance (and measured it with regression testing). I suspect the oversized responses and cherry-picking are a result of back end and client being responsibilities of independent teams and client team is told "use this pre-existing kitchen-sink endpoint".
- enraged_camel 7y agoI don’t think blogs are a good example. How much complex logic do they have, and how many database queries and data processing do they do before they serve their content? Furthermore, how much interactivity do they have? Not much.
- TeMPOraL 7y agoI'd guess as much as 90% of pages out there - fetch a blob of data from the server, render it, and have most interactions not touch the server at all. You can view e.g. ecommerce sites as blogs with one post per combination of (search query, filter switches, page selected). This necessitates frequent shots to server, but the site otherwise transfers roughly a page's worth of data per viewed page. I've never seen an on-line shop that was made better by being an SPA, over an old-school page reload every click. Similarly discussion forums - there's Discourse that's arguably more gimmicky with its client-side magic; beyond that, if you want to see what would happen if you turned HN into an SPA, look no further than the dumpster fire the new Reddit design is.
- shard972 7y ago> webpages on good connection are so fast Not everyone has this, espicially when your someone like myself who writes informational websites for people who won't be connected to any internet for hours at a time. Super fast response times don't cut it when your response time is non existent at the moment.
- throwaway2048 7y agoIf your internet connectivity breaks constantly, there is a good chance that a JS heavy client side app is going to irrecoverably break, require a hard refresh and take much longer to load because of your crap internet. I should know, my internet connectivity sucks, and single page applications are almost without exception, a completely awful experience.
- onion2k 7y ago... loading times of pure HTML webpages on good connection are so fast they whole thing outruns client-side page switches even if the page is already in memory. Unfortunately for us front end engineers we can't rely on the user having any internet connection let alone a good one. Most of the push behind static site generators is to get as much of the code necessary to display all the website in to your browser as fast as possible, so it's there no matter what happens later. In cases where the user has a fast, robust connection that may well be slower than loading each page on demand, but in cases where the user's connection is slow and flaky (eg on a train) static sites generators do work better. Perhaps the next generation of websites will take your connection in to account better. It depends on whether browsers and users will be willing to give up that information though. As far as I'm concerned I will use everything I can to improve the user experience on the sites I build.
- dijit 7y agoWell. I can speak from a pretty solid experience here. I’ve travelled the US by train, the length of the UK by train and large swathes of Europe by train. The site that tends to be the best to use is the ones that don’t take much to load. Connection tends to be spotty, you get bouts of “some” data and then you’re dry again for a while. If you can squeeze a page load in there it’s infinitely better than a half opened page. Your first page load is -incredibly- important here. It’s the difference between a usable site and an unusable one. The sites that work the best are the ones that do not try to do very much fancy stuff, because that fancy stuff only half-loads most of the time; leaving you to keep refreshing and hoping the spotty connection finally lets you bring in that 2KiB that will allow the page to actually load.
- onion2k 7y agoYour first page load is -incredibly- important here. It’s the difference between a usable site and an unusable one. This is the point I was making. If the server can send the user enough data on the first load to make the whole app/site usable then the user won't need to wait for the network if they're in a tunnel. They've already got the necessary resources (which shouldn't be everything, just what's necessary). In that scenario client side routing beats server side completely because server side rendering just doesn't work when the user doesn't have a network connection. That said though it's wasteful and entirely unnecessary if the user has a good connection. Really websites should have a good mechanism for testing. The Network Information API doesn't have particularly good cross browser support and it isn't especially reliable yet.
- jbergens 7y agoThe article only tested one site with one browser, hardly a good test. It may be correct anyway but it IS not a proof. It may also be much harder to implement something like a comment section that is fast and correct with only static html and a server backend.
- dan-robertson 7y agoI don’t understand why doing things the non-JavaScript way wouldn’t be correct. Surely you still need to do all the correctness things on the server anyway even if you do some in JS because client side validation won’t stop other people (or spammers) from sending invalid requests to the server. When I think of a correctness problem it would be in keeping the js-rendered comment section synchronised with the server-side comment section which seems harder than making it work with no js.