Web Analytics Made Easy -
StatCounter JavaScript detection - CodingForum


No announcement yet.

JavaScript detection

  • Filter
  • Time
  • Show
Clear All
new posts

  • JavaScript detection

    I have used search, but didn't find what I was looking for. Basicallz I was thinking of this:
    reffer all users to "js-dis/home.htm"
    this is where the JS jumps in, if JS is enabled, then jump to "js-en/home.htm"
    I do not want to use the noscript-tag because of having to use a meta-tag inside the noscript-tag which isn't valid xhtml.
    This to me at least seems possible if it's written like this:
    <"script type="text/javascript">
    redirect to...
    redirect to...

    any thoughts?

  • #2
    Make the default page the page that the users with JS disabled will see. Add this in the head tags of that page.
    <script type="text/css">
    This way if JS isn't enabled nothing will happen but for the JS enabled users they get directed to the page that uses the javascript. I think this method is more feasible rather than trying to detect if a user has JS enabled or not because I don't think this is possible. It might be with a server side language but then again not even sure about that.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


    • #3
      Thanks, that's what I meant. I wasn't really looking for a way to detect, more in the way of if js then...
      This is what I was looking for though I might make a standard page that tells people of for having JS disabled...
      Thanks again.