views:

359

answers:

16

What file extensions are used most commonly by different languages? Please don't put source file names (like .java) but rather extensions that would be present in a URL for rendered pages.

Here is my (alphabetized) list so far

  • ASP Classic
    • asp
  • ASP.NET
    • aspx
    • axd
    • asx
    • asmx
    • ashx
  • CSS
    • css
  • Coldfusion
    • cfm
  • Erlang
    • yaws
  • Flash
    • swf
  • HTML
    • html
    • htm
    • xhtml
  • Java
    • jsp
    • jspx
    • wss
    • do
    • action
  • JavaScript
    • js
  • Perl
    • pl
  • PHP
    • php
    • php4
    • php3
    • phtml
  • Python
    • py
  • Ruby
    • rb
    • rhtml
  • XML
    • xml
    • rss
    • svg
  • Other (C, perl etc.)
    • cgi
    • dll

Any more? I'll keep updating this based on comments. Largest correct additions (or deletions) is the accepted answer.

Aside: This is for comparing language use online: http://blog.paulisageek.com/2009/10/file-extensions-on-internet.html

A: 

.yaws (Erlang Yaws Web Server)

jldupont
Added, but not much on the net http://www.google.com/search?q=ext%3Ayaws
Paul Tarjan
A: 

.js, .html, .htm, .xhtml probably deserve a nod.

Dean J
Good call. Added
Paul Tarjan
A: 

.aspx .asp .css

Daren Schwenke
Added asp and css.
Paul Tarjan
A: 

.action -- struts2

.do -- struts1

.xml -- XML

.rss -- RSS feeds

.atom -- Atom feeds(RSS)

(no extension) -- used now a days to increase readability of the URL, check stackoverflow URL

Xinus
What language is struts? is it a framework for java?
Paul Tarjan
yep....................
Xinus
added. thanks..
Paul Tarjan
A: 

Ruby on Rails also uses the following internally for templates (files that are mostly HTML or JavaScript). So they're not really public facing, and are transparent to the end user/robot.

  • .html.erb
  • .erb
  • .rjs

Used to be that most CGI scripts were written in Perl.

EmFi
I'm tentative about adding CGI to perl. I'll do more research. But I added those for ruby.
Paul Tarjan
+9  A: 

Keep in mind that good URL design will completely hide any underlying file types.

ndim
Yup, this is why it is only approximate. A lot of people still don't do that.
Paul Tarjan
now a days there are no extensions for increasing readability of the URL, check stackoverflow URL
Xinus
correct. which is why i'm doing this study now before it is too late :)
Paul Tarjan
A: 

AOLServer using Tcl - .adp

RHSeeger
now you're pulling my leg. there are 0 of those online http://www.google.com/search?q=ext%3A.adp
Paul Tarjan
AOLServer developers are, apparently, better at mapping clean URLs to the underlying pages I guess.
RHSeeger
A: 

Add there:

  • ASP.NET
    • .axd
    • .asx
    • .asmx
    • .ashx
    • .aspx
Cleiton
Is ASP.NET == ASP?
Paul Tarjan
No - completely different apart from the branding.
Lucas Jones
ok, added. thanks.
Paul Tarjan
If you're going to list .asmx for ASP.NET web services, then you should also list .svc for ASP.NET hosted WCF services.
Cylon Cat
A: 

REBOL tends to use .r

But .cgi is also used by some for REBOL CGI scripts.

Sunanda
most of the .r don't look like rebol to me. http://www.google.com/search?q=ext%3Ar . Do they look right to you?
Paul Tarjan
I think those are just coincedences with people ending usernames with '.r'.
Lucas Jones
even on the pages way down, they still look like garbage. sorry.
Paul Tarjan
Not all [b].r[/]b is [b]REBOL[/b]. But much [b]REBOL CGI[/]b is [b].r[/b].
Sunanda
A: 

ASP.NET needs a couple more, but I'm not sure this is exhaustive:

  • aspx
  • ascx
  • asmx (web services)
John Fisher
added ascx. does the set look comprehensive now?
Paul Tarjan
@Paul, that is much better.
John Fisher
However you won't see the .ascx in a URL.
erikkallen
A: 

Here's a few of the commonly-used (but rarely enforced) extensions for some CSS dialects:

Steve Losh
interesting, I've never heard of them. They look more like source files than extensions of actual pages on the next. Am it correct?
Paul Tarjan
**@Paul Tarjan:** Yes, that's what they are, but so are `py` and `rb`, so that's what I figured you were looking for.
Steve Losh
A: 

Ruby also tended to use .rhtml in the past.

Stellent uses the .hcsp extension for its page templates.

I believe Django uses .dtl.

mbarnett
I've never heard of anyone using `.dtl` for Django templates. The overwhelmingly common standard seems to be using the extension of whatever kind of file the template will be rendered to. If it's producing a css file, it's `mytemplate.css`, if it's making an html file then `mytemplate.html`, etc.
Steve Losh
A: 

Going old school: .cgi

Typically written in C or Perl

Matt Lacey
heh, but what language? perl?
Paul Tarjan
A: 

.java .cs and .i_am_kidding_i_read_the_question.

On the serious side, swf (Flash) get hidden by the JS that loads them, generally, but they are extensions usually seen by the client. This is a limit case because it's not like JPEG (doesn't allow for web programming) nor like Javascript. But then, neither is PHP/ASP/JSP because from the client side it's just markup :)

Yar
A: 

IE specific strangeness:

  • .hta -- html application
  • .htc -- html components, allows you to alter IE behavior at runtime, from you website!

Also XML:

  • .svg -- it's not just an image format!
slebetman
+1  A: 

I am curious as to the adoption of jsf for Java based web applications. How does this compare to just regular old jsp. So, please add .jsf to the Java language group. Thanks

Grant