Believe me it is very simple. When I found the following solution a long time ago, I was amazed by its simplicity and effectiveness.
As a start, we need to insert a form in the body of our page. I would suggest, we put it at the very beginning of the page:
<form name="js" id="js">
<input type="hidden" name="JSstate" value="false">
Now you begin to understand the logic, don't you?
Have a nice day and happy coding!