Make old browsers (e.g. Opera Mobile Classic) use the "noscript version" of Discourse

I don’t know if this is an existing feature or not, but it would be nice if older browsers that support Javascript but aren’t really usable with Discourse could just see the same static content that you see with Javascript disabled, instead of a broken page or an error message. After all, the web was designed to gracefully degrade.

It seems like this should only take a few extra lines of Javascript at the top to check if the browser is blacklisted or lacks certain features, and then skip the rest of the script and “enable” the content from inside the < noscript> tag. I don’t know if there’s any particular reason why it would be harder than that.

For example, I use Opera Mobile Classic and Opera Mini on my phone (because they’re much faster than Chrome). Opera Mobile sort of works for reading, but has too many bugs to really use any of the UI. Opera Mini just shows an error message saying that the browser is too old (funnily enough, you can actually navigate and read the forums via the built-in RSS reader :​-P). While it is possible to disable javascript in these browsers, the option is very hard to find.

3 Likes

I tried to do this, but coincidentally browsers are even more inconsistent at providing access to the contents of <noscript>.

Perhaps it could set a no_js cookie or something and have Discourse render the ‘crawler view’?

2 Likes

I believe @riking has a pending PR in this area you should look at it this week @sam.

Yup, here:

https://github.com/discourse/discourse/pull/3105

2 Likes