[Django]-JavaScript is enabled in client browser in django?

3👍

From a comment:

I want to check whether it is enabled show a view whether not show a different view.

This is your real question, and if you had started with this (instead of assuming you had to check from Django) there wouldn’t have been an argument in the comments.

How to redirect javascript-enabled browsers to a different view

Put this in the header of your non-javascript page:

<script type='text/javascript'>
   window.location = "/javascript_view.html";
</script>

Nothing Python, Django, or cookie-related is necessary.

👤Izkata

1👍

After this ends up in a long discussion (see comments) just read this post, this should answer your question , since you asked to have some example specifically for django

Django check if JavaScript is on

Leave a comment