Ok, I'll bite - how else do people do this? (Speaking as someone who has ONLY ever done it this way.)
The most common is using an HTTP header. Less common: `document.location` in JavaScript https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirectio...
I just learned about HTML redirects (2020)
21–30 of 88 posts
That wouldn't work in a noscript
Re: I just learned about HTML redirects (2020)
#22I remember once learning that php has a `header` function and have been using 'location:...' since ever (pre-2000) as php was almost always supported by hosters like dreamhost, hostgator, and nearly every Linux install came pre-installed with Apache and the php mod. The meta htttp-equiv was a last resort (like gh-pages). Never really used the JS option unless it was part of the application.
Re: I just learned about HTML redirects (2020)
#23This is also used as a poor man’s live feed: just use this element to reload the page or frame on a set interval.
This is one of the oldest tricks in the book and was used heavily before WebSockets and similar became mainstream.
Re: I just learned about HTML redirects (2020)
#24Ok, I'll bite - how else do people do this? (Speaking as someone who has ONLY ever done it this way.)
one way it's not done is with DNS
Re: I just learned about HTML redirects (2020)
#25Re: I just learned about HTML redirects (2020)
#26Re: I just learned about HTML redirects (2020)
#27This reminds me of the days of making text adventures that used a width 0 frame to store background variables.
Re: I just learned about HTML redirects (2020)
#28Ah, and next you might discover one of my favorite unresolved browser issues:
Re: I just learned about HTML redirects (2020)
#29Earlier quoted context omitted.
Not 'official' and yet supported by all major browsers to this day.
It is official.
My bad. I was thinking of the refresh header, not the HTML meta refresh. The header I believe is not official but nevertheless supported by many browsers since Netscape Navigator. In PHP:
header("Refresh:; url=");
Re: I just learned about HTML redirects (2020)
#30Earlier 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.
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.