ajax_update function instead of too much duplicated code
fixes #8
Merge pull request #9 from mihai-varga/gh-pages

Back navigation issue fix