miscoranda: by Sean B. Palmer

Fragment Redirects

Just a brief sketch, in JavaScript:-

<script type="text/javascript">
<!-- 
var fragmap = {}; 
fragmap['#code'] = './code/'; 
fragmap['#faq'] = '/faq/'; 

if (location.hash) { 
  if (location.hash in fragmap) { 
     location = fragmap[location.hash]; 
  }
}
// -->
</script>

Obvious drawback: only works in JavaScript enabled browsers. In fact, even then you have to refresh the page (in Phoenix 0.5, at least) to get it to work.

by Sean B. Palmer, at 2003-02-09 20:53:27. Comment?

HTML Considered Harmful—Again · {}

Sean B. Palmer