What are common file extensions for web programming languages?

Viewed 34773

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
  • jhtml
  • Java
  • jsp
  • jspx
  • wss
  • do
  • action
  • JavaScript
  • js
  • Perl
  • pl
  • PHP
  • php
  • php4
  • php3
  • phtml
  • Python
  • py
  • Ruby
  • rb
  • rhtml
  • SSI
  • shtml
  • TS
  • 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

19 Answers

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!

-SSI (Server Side Includes), use the extension .shtml

.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 :)

Related