Let's say I have the following link:
www.blahblah.com/#!?page=index
How to convert it to one of the following:
www.blahblah.com/#!/index
www.blahblah.com/ajax/index
www.blahblah.com/index
Can someone give me examples of each of the above questions?
Thanks a lot!
, (#) , . JavaScript. , , window.location.hash.
#
window.location.hash
- :
hashString = window.location.hash.substring(8); window.location = 'http://www.blahblah.com/'+hashString;
substring (#!?page=), index.
substring
#!?page=
index
, . , , js.
Facebook - , URL- , . , , , , , , , php, .
The hidden # in the ajax page loading strategy is done using HTML 5 pushState.
In javascript you can use window.location.hashfor this.