What are common file extensions for web programming languages?

33,067

Solution 1

Add there:

  • ASP.NET
    • .axd
    • .asx
    • .asmx
    • .ashx
    • .aspx

Solution 2

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

Solution 3

I have created a Github gist that contains a list of programming languages and their extensions, here is a subset of the data included in the gist file:

{
  "name":"CoffeeScript",
  "type":"programming",
  "extensions":[
     ".coffee",
     "._coffee",
     ".cake",
     ".cjsx",
     ".cson",
     ".iced"
   ]
  },{
  "name":"ColdFusion",
  "type":"programming",
  "extensions":[
     ".cfm",
     ".cfml"
  ]}

I hope it is helpful.

languages.json.

Solution 4

  • .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

Solution 5

Here is an extension you forgot:

Share:
33,067
Paul Tarjan
Author by

Paul Tarjan

I'm a Distinguished Engineer at Robinhood. I used to be the Tech Lead of Developer Productivity at Stripe where I built Sorbet. Before that I was the CTO and cofounder at Trimian. Before that I was a Software Engineer at Facebook on HHVM and the Open Graph. Before that I was the Tech Lead for Yahoo! SearchMonkey. See my homepage for more.

Updated on July 09, 2022

Comments

  • Paul Tarjan
    Paul Tarjan almost 2 years

    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
    • 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