Jump to content

Hashing facebook style


9three

Recommended Posts

Hey,

 

I'm trying to implement hashing like facebook. But I'm having a hard time understanding because I can't really find any useful examples/tutorials online.

 

Facebook href is the following:

 

Home:

http://www.facebook.com/home.php?ref=home

 

Profile:

http://www.facebook.com/profile.php?id=000000&ref=profile

 

When you click on the profile the hashing turns into:

http://www.facebook.com/home.php?#/profile.php?id=000000&ref=profile

 

Does anyone know how to implement this? I tried doing:

 

<a href="#about">About Me</a>

 

But it creates an anchor, and it's not what I'm really looking for.

Link to comment
Share on other sites

Anything after the pound sign (#).

 

window.location.hash

theirs no need for that, i mean if you do use it, its built into JavaScript, but you will have to parse it into php using regext and all variables after it, they may conflict with the rest of php's get vars.

 

i mean the only benefit i can see in this is to separate variables destined for java script fronted from php variables in the url, i mean for an ajax interface it may be usfull.

 

but arnt the variables after a hash related to anchors ?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.