4 ms·
HTTP 204 is amazingly under utilized in avoiding JavaScript. It allows messages to a server without a page refresh or XHR. Click a link, server replies 204, br
by donatj 8y ago
HTTP 204 is amazingly under utilized in avoiding JavaScript. It allows messages to a server without a page refresh or XHR.
Click a link, server replies 204, browser stays where it is. Remarkably handy and imho underutilized.
If you don’t mind a little basic JS you can do some pretty powerful things without any XHR.
- dzek69 8y agoso you click stuff and nothing changes - how that is useful? :) usually when you're sending an xhr - you want something to change, some like status bar, cart items listing, anything btw: you can achieve the same with simple css: `element:active` should have a background image that will perform an server side action when loaded
- mrob 8y ago204s are more reliable. The "cascading" in "cascading style sheets" means they are designed and intended to be overridden. The user can and often does apply their own custom CSS.
- lytedev 8y agoAnalytics immediately comes to mind! I'm going to have to look into this as I'm wanting to get away from GA!