Loading ...
Sorry, an error occurred while loading the content.

Javascript vs PHP OT

Expand Messages
  • Ray Shapp
    Hi Absalom and All, This is a bit OT here, and I ll take it to the Off Topic list if replies are necessary. Absalom said in answer to a question in a different
    Message 1 of 2 , Sep 2 10:00 AM
    • 0 Attachment
      Hi Absalom and All,

      This is a bit OT here, and I'll take it to the Off Topic list if replies are
      necessary.

      Absalom said in answer to a question in a different thread on this list, "What
      you need is either Javascript - bad because most sensible users disable
      uncontrollable code running let loose on their machines - or better PHP".

      My question: Why is PHP safer than Javascript? I'm about to begin using
      Javascript on some of the pages in a website I maintain. I don't know PHP
      code, but I'll learn it if (a) it has better security characteristics than
      Javascript, and (b) If there is less chance that any of our users will block
      it.

      Thanks for the help.

      Ray Shapp
    • Larry
      ... PHP runs on a Server, while Javascript runs on the client. So a Javascript procedure might force your machine to do something unwanted, while PHP usually
      Message 2 of 2 , Sep 2 2:54 PM
      • 0 Attachment
        On Sat, 02 Sep 2006 13:00:28 -0400, you wrote (with possible editing):

        >Hi Absalom and All,
        >
        >This is a bit OT here, and I'll take it to the Off Topic list if replies are
        >necessary.
        >
        >Absalom said in answer to a question in a different thread on this list, "What
        >you need is either Javascript - bad because most sensible users disable
        >uncontrollable code running let loose on their machines - or better PHP".
        >
        >My question: Why is PHP safer than Javascript? I'm about to begin using
        >Javascript on some of the pages in a website I maintain. I don't know PHP
        >code, but I'll learn it if (a) it has better security characteristics than
        >Javascript, and (b) If there is less chance that any of our users will block
        >it.
        >
        >Thanks for the help.
        >
        >Ray Shapp

        PHP runs on a Server, while Javascript runs on the client. So a
        Javascript procedure might force your machine to do something
        unwanted, while PHP usually just serves html.

        That said, AJAX (used to produce dynamic websites which actively
        update only parts of the screen) uses Javascript on the client. What
        some folks do for example:

        A weather site. They use PHP to download the most current
        data for those that have Javascript turned off and AJAX to make the
        site live; i.e., they constantly update the temperature, barometer,
        wind speed and direction, etc. Here is an example:
        http://www.carterlake.org.

        Ajax stands for "Asynchronous Javascript and XML". PHP can be
        replaced with Python, Perl, PHP, or other dynamic languages which run
        on a server.

        You can write for both Javascript running or not on a browser
        via the <script></script> or <noscript></noscript> html tags

        Btw, I am not an expert in either language
        --

        Larry
        Email to rapp at lmr dot com


        >
        >
        >
        >Fookes Software: http://www.fookes.us, http://www.fookes.com
        >Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
        >
        >Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.