hackerspacesg / hackerspace.sg

Hackerspace.sg 2.0 using Punch
https://hackerspace.sg/
17 stars 25 forks source link

Add HTML Push State support. Added jQuery library. #54

Closed miccheng closed 10 years ago

miccheng commented 10 years ago

To add blazing fast load time between pages. URL changes too. Gracefully degrades to fallback to URL if the browser doesn't support this.

Done using this library: http://davisjs.com/

Also added jQuery library to aid in DOM manipulation.

miccheng commented 10 years ago

jQuery is needed to easily make Ajax call and update the dom with the new content.

kaihendry commented 10 years ago

So you are proposing adding thousands of lines of code for faster load times between pages?

Er, is it slow? Can you prove the site is slow?

If it is slow... perhaps adding a offline manifest would be a "less code" way of improving load times. All you would need to do is list the pages, it would be cached and it would be fast to move between them.

miccheng commented 10 years ago

The speed improvement might be negligible. But the main benefit is that the Scrollback.io widget doesn't reload every time someone navigates to another page.

kaihendry commented 10 years ago

Oh interesting. Still I don't think it's worth it. I am still dubious about scrollback.io's utility.

Seriously yet to have an intelligent conversation on #hackerspace.sg with someone using that client.

miccheng commented 10 years ago

Maybe the reason is because the widget keeps reloading when he navigates our site. :p

miccheng commented 10 years ago

Seems like i botched the merge on my local branch. I'll create a new PR.

kaihendry commented 10 years ago

You needn't close the PR, just force update you miccheng:pushstate-support branch once you have everything working.