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.
This is called Server Sent Events, SSE for short. https://developer.mozilla.org/en-US/docs/Web/API/Server-sent...
I just learned about HTML redirects (2020)
41–50 of 88 posts
Re: I just learned about HTML redirects (2020)
#42Re: I just learned about HTML redirects (2020)
#43Earlier 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.
This is called Server Sent Events, SSE for short. https://developer.mozilla.org/en-US/docs/Web/API/Server-sent...
CGI:IRC used an early frame approach, no JS required.
At some point JSONP became popular, even for 3rd party APIs.
Server writes: lol({ ... })
lol({ ... })Re: I just learned about HTML redirects (2020)
#44Ok, 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…
Re: I just learned about HTML redirects (2020)
#45Ahh. This brings back memories. I used to do this when I was using Adobe (Macromedia originally) FLASH back in the day. If no FLASH, show them the shitty version. HAHA. Good times.
You'd be surprised how often Flash was "the shitty version" as it was almost always bloated with long load times, inaccessible content and a lot of pointless stuff that was clearly to impress the client who comissioned it , not the poor user who wanted to find something out.
Re: I just learned about HTML redirects (2020)
#46Earlier 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.
This is called Server Sent Events, SSE for short. https://developer.mozilla.org/en-US/docs/Web/API/Server-sent...
Re: I just learned about HTML redirects (2020)
#47Earlier quoted context omitted.
This is called Server Sent Events, SSE for short. https://developer.mozilla.org/en-US/docs/Web/API/Server-sent...
SSE is cool, but as others have pointed out, this isn't that. I also wouldn't call this Comet: almost unilaterally, Comet referred to using it in concert with JS/Ajax and usually was just a fancy way of saying long-polling (though I admit it's a bit broader than that in truth). What CGI:IRC did was different: it streamed HTML directly. More to the point, it didn't use chunked encoding or any kind of framing in the bo…
I think the wiki page is wrong that it involved chunked encoding
Re: I just learned about HTML redirects (2020)
#48Ok, 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
Serve a "shitty" page by default, redirect with JS to "enriched" page. Or tinker with server configuration to depend on 'Host: nojs.plz.fqdn'.
Re: I just learned about HTML redirects (2020)
#49Earlier quoted context omitted.
SSE is cool, but as others have pointed out, this isn't that. I also wouldn't call this Comet: almost unilaterally, Comet referred to using it in concert with JS/Ajax and usually was just a fancy way of saying long-polling (though I admit it's a bit broader than that in truth). What CGI:IRC did was different: it streamed HTML directly. More to the point, it didn't use chunked encoding or any kind of framing in the bo…
Looks like 'Comet' got coined in 2006. The CGI:IRC approach.. I had a smile and an "aha" on seeing the term "forever frames" :-) I think the wiki page is wrong that it involved chunked encoding
Another term you don't see too often these days is the "holy grail" layout. I definitely remember the days of messing with negative margins and clearfix to get my page layouts to look nice while still working in IE 6 :)
Re: I just learned about HTML redirects (2020)
#50Earlier quoted context omitted.
That wouldn't work in a noscript
Not sure why you're being downvoted. Many of the sibling comments are referring to server side generated HTTP 302 headers, and server side (without lots of fancy shenanigans) you won't know (server side) if the client has disabled scripting on the first page hit. And document.location is pointless if the client has turned off scripting.
A) “how do people redirect”, to which the point about noscript sounds like irrelevant whining
B) “how do people redirect only visitors who don’t have scripting” to which most of the answers are trivially wrong