Server side progressive promotion?

Nowadays, a lot of the links on our pages change to href="javascript:void(0);"

on pageload, but if you are impatient (like most users) you can click links before the page loads and lands on clunkier, non-javascript, non-ajax pages.

I am thinking of progressive improvement these days and I predict most of our users will have javascript enabled (no data yet, we haven't run alpha yet)

Wouldn't it be a good idea to generate some indicator that the user has javascript for the session and then serve pages that assume javascript? (i.e. the server installs href="javascript:void(0);"

from the very beginning)

0


a source to share


3 answers


Why not just do it?

<a href="oldversion.htm" onclick="...something useful......; return false;">link</a>

      



return false

tells the browser not to wrap the url in the href.

Now js visitors get fancy js and non-js users quietly leave; and no need to change links to pageload.

+4


a source


Are you doing your progressive boost on boot? You can try to move it to (cross browser) DOMReady.



0


a source


Could you delegate this to the document to keep your HTML clean?

For example, in jQuery:

$( document )
    .click( function(){ return false })
    .ready( function(){ $( this ).unbind( "click" ) } )

      

0


a source







All Articles