mrdoob/glsl-sandbox — Issue #1: each code change generates a new history record, breaking prev/next buttons
Author: millermedeiros
Created: 2011-11-09 15:58:07+00:00
State: open

here is a diff that fixes it:

```
﻿﻿﻿﻿﻿﻿diff --git a/build/index.html b/build/index.html
index 1d2b60b..13f76b2 100644
--- a/build/index.html
+++ b/build/index.html
@@ -254,7 +254,8 @@
if ( currentProgram ) {

gl.deleteProgram( currentProgram );
-	window.location.hash = encodeURIComponent( fragment );
+	//avoid storing multiple values in the history (so back/prev buttons works properly)
+	window.location.replace('#'+ encodeURIComponent( fragment ) );

}
```