Browsers would automatically pull in CSS and JS according to the filename and I would no longer have to look for an example every time I need a link or script tag.

In the absence of any other spec, /abc/def.html would cause the browser to look for /abc/def.css and /abc/site.css and /site.css. And then it would look for the same, but in JS - /abc/def.js, /abc/site.js, and /site.js. If I had all the time in the world, I’d make an Apache filter to do just that.

This would slow things down a little, but have you noticed - the world is becoming faster? It’s an another example of abundance thinking. Also, if it was a standard, it would not really slow things down as browsers and servers would develop protocols for speeding things up.

So I created a little Ajax web app template to put all the skeleton Ajax code on one page.

HTML

<html>
  <head>
     <title>Hello World!</title>

     <script type="text/javascript" src="app.js"></script>
     <link rel="stylesheet" type="text/css" href="app.css"/>

  </head>
  <body>
      <h1>Hello World!</h1>
      <input id="search" name="search" />

  </body>
</html>

CSS

body { background-color: white; }
div.error { font-color: red; }
#search { width: 200px; }

Javascript

function $(id) { return document.getElementById(id); }

window.onload = function() {
  $("search").onclick = function() { alert("The search begins!"); }
}