[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / 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

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor applications are now closed. Thanks to all who applied!


[Advertise on 4chan]


File: 1753704325505417.png (8 KB, 960x555)
8 KB PNG
I will not use your website.
>>
>>109028039
disable javascript on 4champ and answer me how it works out for you
>>
>>109028039
i dont get the js/single page application hate. it gives you a lot more flexability than static sites
>>
>>109028277
>flexability
I thought it was CSS that gives you flexability.
>>
File: 1772742335646910.jpg (30 KB, 1687x217)
30 KB JPG
>>109028302
no i mean like dynamically load content, replace elements on the page , shit like that.

for example pic related hides the stock reply button and displays the reply form on this page when you click on the reply button. you want to do it without scripting you'd have to load a whole new page from the server with only that one element replaced
>>
>>109028277
>>109028302
>flexability
Good morning sirs
>>
>>109028039
>Hates JavaScript
>Post on 4chan
>>
>>109028277
They hate it because of the way javascript is misused (a website fetching 50 different bundles totalling 50MB, layout jumping around as it loads, causing their fans to spin up).
>>
>>109028043
NTA but with Javascript disabled I can't post because the captcha doesn't show up
>>
>>109028277
>single page application
i'd like to be able to use my browser history for navigation, or to properly save a page locally without missing half the content because it's loaded dynamically
>>
>>109028277
It makes your website slower 99% of the time.
That said, you can build SPA using only POSTs, but js does fill certain needs that can't be done with plain HTML/CSS, like websockets, or SSE for fetching live updates
>>
>>109028043
heh
>>
>>109028820
that's why I said it, OP is a retard
>>
>>109028820
no shit retard
>>
>>109028039
Then don't. You are the 0.1% nobody will miss.
>>
>>109028862
You talk as if it was obvious but in reality it didn't have to be this way.
There could e an alternative Javascript-free captcha that showed up if you had Javascript disabled.
>>
>>109028839
>i'd like to be able to use my browser history for navigation,
You can do that with SPAs.
>or to properly save a page locally without missing half the content because it's loaded dynamically
as .html file? You can't do that, but nobody does that anymore anyways.
>>
Nothing wrong with JS. It's just /g/ being contrarians and pretending they know something about something they don't (as usual).
>>
>>109028872
>as .html file? You can't do that, but nobody does that anymore anyways.
I do that to save important stuff. The only reason I don't do it more is because it often doesn't work so I will instead take a print screen of the page but that's not as good because it turns the text into pixels making it harder to search on it etc
>>
File: 1773823540042222.jpg (38 KB, 513x715)
38 KB JPG
>>109028814
the whole point is to improve performance by offloading things that make sense to the user's pc.

instead of fetching a whole ass new page from the server with 1 tiny difference (hiding button, unhiding new post form) you just add a small js script that does it on the fly with no new requests. the site host gets less requests/strain on the server and the user gets instant interactivity instead of waiting 500+ms for a new page to load on every button click.


also pic related is the network tab of the youtube main page, a fairly heavy one-page-app. it's really not that much things like images take up a lot more of your traffic. most of the interface/site is even cached locally after you've accessed it once including the js this is why you can 'open youtube' when your internet is disconnected (but you wont see any new videos show up in the interface)

>>109028839
you can do that too you can add URL paths and history support to single page applications

>>109028841
slower than fetching a whole page for every click? and why use only POST?
>>
I don't understand why WASM isn't a complete JS replacement yet
>>
>>109028889
>slower than fetching a whole page for every click?
learn proper UX then.

An entire page is in the 10-20kb range. That fits in the same number of packets as a 100byte js request/response, which is exactly one.
>>
>>109028895
Because WASM is shit
>>
>>109028895
Cause it's fucking slow as hell.
Not in principle, but every time something is built with it, it's a dumpster fire.
Look at spotify and ask yourself if the experience is responsive and acceptable, then compare with soundcloud and you'll have your answer
>>
>>109028905
>Look at spotify
I think the people at FAGMANN are the problem, not the tech
>>
>>109028889
>YouTube
Funny how you pick one of the worst examples. I opened YouTube just now and it took over 15 seconds to load. It will be less work for the server to simply grant a more complete page, rather than taking many small requests.

MPA vs SPA is a false dichotomy; it's all about balance.

Each web page should fulfill a particular function: One page to upload videos; one page to watch a video/playlist; one page to login/register. Within those webpages Javascript can play an important role, such as making a POST request via `fetch()` and updating page content instead of opening a separate page each time. The user shouldn't need to traverse across these webpages often, and it's more lightweight and easy to maintain whilst keeping much of the benefits of an SPA.
>>
>>109028039
Literally me. If a random website on google search doesn't load then I move to the next one
>>
>>109028895
I was optimistic about WASM until I found out it's basically just minified Javascript. Qt for Webassembly seemed interesting but their examples are really pathetic.
https://www.qt.io/development/qt-demos
check out that .3 second delay for clicking a button.
>>109028905
Soundcloud was ruined by a major UI update recently, but it was pretty good before.
>>
>>109028950
thats literally how they do it if if i switch between home/shorts/subscriptions it just hides/unhides elements and fetches video titles/links/thumbnails from the server
while clicking on 'create' sends me to a whole separate site (youtube studio) to upload videos


the idea of bundling all the common infertace functionality into a single webpage load and just getting additional content as-needed is great. if it loads slowly for you its probably just your ISP/local CDN being shit, userscripts on your broser or a slow pc.
>>
>>109029038
>thats literally how they do it
No lol, the homescreen is on the same page as watching a video or viewing a channel. At least Studio is a separate page, but they're still far too big.
An SPA becomes such a pain in the ass to maintain (I would know, I worked for a company that built one), as well as performing terribly once the page becomes bigger than some student's project.
A greater separation of concerns between pages means the browser can cache more effectively. An update to one page will not invalidate the cache across all views. 4chan/Yotsuba is too close to MPA for my liking, but one thing it does well is caching.
>slow pc
I have a pretty average setup, thank you very much. Not everyone is using a ryzen 7 and gigabit ethernet. Admittedly I had cache disabled - with caching now enabled, the load time dropped from 17 seconds to a breakneck 11 seconds. Almost none of the JS is getting cached, only the media.
>>
>>109028980
Idk wasm seems to be doing fine, at least for my use cases
>>
>>109028039
fuck off then stupid 45 year old boomer,
javascript is here to fucking stay
>>
>>109028390
>you want to do it without scripting you'd have to load a whole new page from the server with only that one element replaced
<!DOCTYPE html>
<style>
* {
font-family: arial;
}

body {
background: #EEF2FF;
}

summary>a {
color: #34345C;
}

summary>a:hover {
color: #DD0000;
}

details[open]>summary {
display: none;
}

tr>td:first-child {
background-color: #98E;
font-weight: bold;
border: 1px solid;
padding: 0 5px;
font-size: 10pt;
}
</style>
<details>
<summary style="list-style: none;cursor: pointer;font-size: 22px;font-weight: bold;">[<a>Post a Reply</a>]</summary>
<table style="border-spacing: 1px;">
<tr>
<td>Name</td>
<td><input name="1" placeholder="Anonymous"></td>
</tr>
<tr>
<td>Options</td>
<td><input name="2" style="margin-right: 2px;"><input type="submit" value="Post"></td>
</tr>
<tr>
<td>Comment</td>
<td><textarea name="3" cols="48" rows="4" wrap="soft"></textarea></td>
</tr>
<tr data-type="File">
<td>File</td>
<td><input name="4" type="file"></td>
</tr>
</table>
</details>
>>
>>109029747
Yeah I'm using WASM too. It has some uses, it's just not the revolution it could've been.
What do you use it for? I use a WASM module to calculate argon2id password hashes on the client-side.
>>
>>109028390
>>109029823
I use a <details> element like this in https://fuze.page/mediaboard/
Still, I can't think of a way to add the ID of the message into the text field without Javascript, using `document.createRange()` and all that.
>>
>>109028965
Google search takes Javascript thodobeit.
>>
>>109028820
obviously, you have to pay, and that's even more cucked than just enabling the stupid page scripts
>>
>>109032158
Google isn't a "random website"
>>
File: IMG_0290.jpg (201 KB, 1040x1023)
201 KB JPG
>>109028039
>I will not use your website.
and I will not care when you're 0.01% of users
enjoy the internet being increasingly inaccessible to you ig?



[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.