Is Server side programming always safer than client sided ones?

Posted on 2007-10-10
Last Modified: 2008-01-09
are there effective ways to protect the codes in a client sided webpage? Is the server sided programming always better than the client sides ones in term of protecting the codes. I would appreciate it if you could answer with a bit detailed information, instead of "yes, it is better" or " No it is not."
Question by:wsjwsj2
    LVL 142

    Assisted Solution

    by:Guy Hengel [angelIII / a3]
    server-side code only needs to be protected on the server itself
    -> only a hacker getting access to the server direclty (telnet, ftp etc) can see any file contents on that server, ie web page code

    client-side code cannot be protected, the "best" you can achieve is obfuscation.
    LVL 24

    Accepted Solution

    Server-side programming is usually considered safer. Consider this analogy:

     Do you feel more safe with your nest egg stored in a safe in your bedroom, or in a vault at your bank? The bank's vault is stronger, more expensive, and heavily guarded. Your home is accessible to anyone who is bold enough. Once someone has access to your safe, it is only a matter of time before the safe can be cracked, even if you use state-of-the art technology. In a managed environment, however, the opportunities for manhandling the vault are usually more limited.

    If you deliver your code to your client's browser, even with encryption, it can be reverse-engineered and then defeated. If the code never leaves your server, a cracker must first gain access to the server, then examine your code. If the server security is tight, not only will the cracker's job be more difficult, you will also be able to see the attempt in progress and stop it before it progresses too far.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now