I was thinking about different server-side languages and this question immediately cropped up in my mind. What was the first server-side programming language using which websites were being created? Was it java or some other language?

Note: I think some languages became prime server-side because they provided or rather aimed to provide better tools and libraries for easy development. I agree Java was not primarly server-side but it provided better tools and hence was and is used a lot.

closed as not a real question by JBRWilkinson, Robert Harvey, EL Yusubov, Jarrod Roberson, Walter Jul 30 '12 at 17:07

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    Websites predate Java. I started (way back in 1995) with C, bash and perl, and I remember Java being announced. – Martijn Pieters Jul 30 '12 at 14:52
  • 3
    In the earlier days of the web, server-side scripting was almost exclusively performed by using a combination of C programs, Perl scripts, and shell scripts using the Common Gateway Interface (CGI). Those scripts were executed by the operating system, and the results were served back by the web server. -- en.wikipedia.org/wiki/Server-side_scripting – Robert Harvey Jul 30 '12 at 14:55
  • 1
    i think it is cgi. en.wikipedia.org/wiki/Common_Gateway_Interface – pandu Jul 30 '12 at 14:56
  • 1
    @pandu: that's not a language. CGI is the API between the webserver and the server-side programs. – Michael Borgwardt Jul 30 '12 at 15:00
  • 6
    Strictly speaking "server-side" predates even the web by ages. In fact, in the era of terminals, all program where running server-side, as the "client" had no real intelligence to speak of. – Joachim Sauer Jul 30 '12 at 15:36

Back in the 'early days' of the web, people hacked web servers using non-standard APIs in whatever language they had handy. Back then, the NCSA HTTPd was the defacto standard, so you mostly used C, I believe. Certainly, each HTTP server product had it's own C API (Netscape had NSAPI, Microsoft ISAPI, etc).

To alleviate this, in 1993 the CGI standard (Common Gateway Interface) standard was developed, allowing a web server to interface with a local process to handle requests. Because web servers were almost exclusively run on UNIX systems, the interface uses environment variables to communicate with the process, and each new request is handled by a new process.

Because you could now use any UNIX process to answer a HTTP request, you could use any language you liked for CGI programs. Personally, I started using shell scripts at first (simply emailing the contents of a web form) but quickly picked up Perl and the emerging CGI.pm module. Per request performance didn't much factor into things yet, the web wasn't so busy at the time. If you needed a fast response time you used static files or one of the aforementioned C APIs to directly interface with the HTTP server.

Java didn't enter the world of computing until 1995, and was first aimed at in-browser applets before becoming popular as a server-side language. By that time, dedicated web application servers, extension modules such as mod_perl and dedicated web programming languages such as PHP, ASP and ColdFusion started to appear. Each of these have had their following, some still survive today. None of them were ever dominant or clearly "first".

  • Nice! So any language could have been used and some became more popular than others. – codecool Jul 30 '12 at 15:19

The first server-side programs were probably extensions to the webservers themselves, which AFAIK were all written in C.

But in the discussions that led to the CGI standard you can already see that the API between webserver and server-side code was implicitly assumed to be language agnostic (based on stdin/stdout), and people talked of "scripts", which is a strong hint that they were thinking of shell scripts (with C as an alternative for high performance).

Shortly thereafter, the first language that really dominated web development was Perl (not least because it's basically shell scripts on steroids), and that is probably your best answer.

Java came later and took over much of Perl's marketshare due to Sun's marketing efforts, and because it delivered a good combination of performance (via thread-based servers), safety (no buffer overflows) and conventional C-like syntax. But it never really achieved dominance the way Perl did for a while.


Well it depends on what you understand by a server. Certainly there were servers applications written (even web) before Java was launched; also, according to its creators Java is not a server-side programming language, but a general-purpose language.

From the begins, client-server relied on dumb clients connecting to mainframes; these were probably programmed in C or COBOL, but as Java they were not designed as server-languages.

Not the answer you're looking for? Browse other questions tagged or ask your own question.