3 ms·
The most common is using an HTTP header. Less common: `document.location` in JavaScript https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections https://
by ssttoo 3y ago
The most common is using an HTTP header. Less common: `document.location` in JavaScript
https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirectio...
- tantalor 3y agoThat wouldn't work in a noscript
- teh_klev 3y agoNot 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.
- aendruk 3y agoDifferent readings of the initial question: 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
- feeela 3y agoTherefore the method called "progressive enhancement" might be an option to start with an HTML-only variant and load JS only if available and required for the current page.