mlaa / cbox-mla

GNU General Public License v2.0
2 stars 3 forks source link

get group directory to listen to GET requests like `/groups?type=forum` #298

Closed JonathanReeve closed 9 years ago

JonathanReeve commented 9 years ago

This will allow us to have URLs associated with certain group directory tabs.

Alternatively, we could use hashes: /groups#forums. This might allow for better AJAX integration.

chriszarate commented 9 years ago

Let's stick with query strings, which are much less complicated than hashes and hash-bangs—especially when it comes to playing nice with Google et al. We can fill in gaps with the History API if we need to. Let's talk about overall strategy here.

JonathanReeve commented 9 years ago

What works:

What doesn't work yet:

chriszarate commented 9 years ago

You're pushing state into the History API, so you just need to listen for popstate. Something like this should work:

jq(window).on('popstate', function () {
  // do stuff with window.location.search
});