Is there a way in Django (preferably in a view) to check if the user has JavaScript turned on?
I need to display a very different page if a user has JavaScript than if they don't.
Thanks
I need to display a very different page if a user has JavaScript than if they don't.
No, you really don't. What you need to do is to make your page work without Javascript, but then enhance it for those people with Javascript turned on. There should be no reason to display a completely different page.
In any case, there isn't a good way of detecting from the server side what the client has enabled. One way of doing it is to serve the non-Javascript page by default, but have a single script that redirects to the other page. But this is pretty horrible, since it means a double page load for most people. As I said, there shouldn't be any reason to do this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With