Live data from Hacker News

I just learned about HTML redirects (2020)

apitman.com

61–70 of 88 posts

Re: I just learned about HTML redirects (2020)

#61
post #55
post #30

Earlier quoted context omitted.

IIRC CGI:IRC had an even more clever version of this: still no JavaScript needed, but Also no refresh needed, as the chat frame response would simply be held open and stream new messages. I never dug too deep into it, but it seemed to work surprisingly well.

Ha remember that too! It’s basically just keeping the socket open and continuously streaming a response. As if it’s just a slow download. It’d also send heartbeat null values to keep the connection open. Of course in the CGI days that really didn’t scale well as it required a whole process to run for each user.

it scaled as well as you would expect coming from those days.

the alternative was a whole computer plus modem per user.

Re: I just learned about HTML redirects (2020)

#64
post #63

Sometimes im flabbergasted on how the most basic html knowledge is lost on newer generations.

This is what you get if you learn everything by just googling exactly what you need for the moment. Reading proper books and RFCs are underrated these days.

I regularly ask people: have you read the man page? Seems a minimum effort one can do.

Re: I just learned about HTML redirects (2020)

#65
post #13

Ok, I'll bite - how else do people do this? (Speaking as someone who has ONLY ever done it this way.)

The noscript tag is the correct way to do this. Server side, when you first generate page content you have no idea if the client has scripting enabled, which is why you include a noscript element to advise the user what to do, or redirect them using a meta tag inside the noscript element. So all these suggestions below to use server side generated HTTP headers and 302 (or 301) redirects are incorrect...because you wo…

> So all these suggestions below to use server side generated HTTP headers and 302 (or 301) redirects are incorrect...because you won't know, on the first page hit, if the client has scripting enabled.

Perhaps I’m misunderstanding you, but do you think that the HTTP approach only works when JavaScript is enabled? That isn’t the case.

Go ahead and use HTTP 3xx responses; they work in all cases. Don’t use the element or the element. Just redirect with HTTP. If you try to use HTML for this, you’ll be serving up 200 OK responses and things that understand HTTP but not HTML won’t understand there’s a redirect.

Re: I just learned about HTML redirects (2020)

#66

Sometimes im flabbergasted on how the most basic html knowledge is lost on newer generations.

Maybe because we collectively pretty badly handled knowledge transmission between generations.

For the pioneers the most difficult part of learning CS was to get hardware needed. This mostly determined the technological stack they would then learn.

Nowadays hardware is commodity and the main problem is to determine what the hell you should start learning first because you can't learn everything it has now became humanely impossible.

I was born somewhen in the middle. Because of my first field I wish I could have mastered python. But at that time the python2/3 war was at the highest and you couldn't find reliable documentation. Hell even python3 tutorial kept on blabbering about how python2 concept translated. What was i supposed to do? learn both?

That is why I focused on SQL because at least documentation was quite stable (special thanks to PostgreSQL documentation teams).

I can only imaging the nightmare that must endure rookies frontend dev nowadays.

Re: I just learned about HTML redirects (2020)

#68
post #26

Earlier quoted context omitted.

This is one of the oldest tricks in the book and was used heavily before WebSockets and similar became mainstream.

I fondly remember html-only iframe chats.

And webcams. I still see these occasionally and wonder if something is broken before realizing it's old-school.

Re: I just learned about HTML redirects (2020)

#70
post #63

Sometimes im flabbergasted on how the most basic html knowledge is lost on newer generations.

This is what you get if you learn everything by just googling exactly what you need for the moment. Reading proper books and RFCs are underrated these days.

Most people learned about this stuff by searching the web back in the day, instead of "reading proper books and RFCs." The reason this knowledge is lost is entirely due to modern web dev taking place within frameworks that abstract all that lower-level knowledge away.
Post reply on HN