Saturday, 31 August 2013

How do I get user specic pages using javascript only?

How do I get user specic pages using javascript only?

I am creating a website where each user will have their uniq page. users
can visit other user's pages by
http://website/user?user=<username>&session=<session>
Now I want to simplify above URL to
http://website/user/<username> (something like pinterest or facebook)
I thought I can use mod_rewrite. However, mod_rewrite is for server side.
I do not want to include any PHP code. What I do to get data for a user :
load the basic HTML template and then based on which user we are talking
about, load user's data asynchronously.
Can I achieve above in JS? If yes, how?
-Ajay

No comments:

Post a Comment