Michael West

6 posts

Michael West

Michael West

@latent22

Katılım Haziran 2024
5 Takip Edilen26 Takipçiler
Michael West
Michael West@latent22·
@htmx_org To get there we also stripped out all the old dead paths and fallbacks for long dead browser compat. 700b less minified code
English
1
0
14
393
Michael West
Michael West@latent22·
@formoxyz @htmx_org Alternative is to hx-retarget or oob swap a div into your pages error div so the user gets notified with useful message and the do hx-get to custom login redirect route with hx-trigger="load delay:5s" or make them confirm with a button.
English
0
0
1
36
Michael West
Michael West@latent22·
@formoxyz @htmx_org Requests where auth fails you could probably just use HX-Redirect header in your response to send the user to your login page. From reading htmx.js around HX-redirect it looks like HX-Refresh header may be set as well.
English
2
0
1
46
Formo
Formo@formoxyz·
Is it possible to cancel a @htmx_org request and do a full page load instead. For example if a user's session expires due to inactivity and the user does a hx-get then I want to due a full page reload to the login page.
English
1
0
0
89
Michael West
Michael West@latent22·
@MtgyBY @htmx_org Non 2xx/3xx respones codes are default ignored. But you do get an event htmx:responseError you can get client scripts or libraries to process. Also hx-target-5* attrib etc to direct the error. Or return the right oob html update data when you detect an error on server.
English
0
0
1
27
htmx.org / CFO of I'm All In (same thing)
a fair negative take on htmx it is not a silver bullet & certainly still requires proper factoring of server side logic, judicious combination with other technologies, a certain mindset, etc. ok not to like it in general & ok not to like it for a specific use!
htmx.org / CFO of I'm All In (same thing) tweet media
English
67
11
668
63.9K