Support sub directory as server base
fix error when pushing back button
optimize javascript
remove unused code
Merge remote-tracking branch 'main/master'