pistachioesque
pistachioesque

Reputation: 342

URLs with #: how does it work?

I've been recently studying MVC frameworks, particularly CodeIgniter, and I found out some of the advantages of working with them. One apparent pro is fixing URLs to make some more sense out of them.

I began to notice some of the URLs in websites today, and I can't really grasp some of them (what's the sense in using them, how does it benefit to the readability of the site, etc..)

For example, Jolicloud:

https://drive.jolicloud.com/#/setup
https://drive.jolicloud.com/#/services/dropbox/53e03563c389d0a00006a962/
https://drive.jolicloud.com/#/services/google-docs/53e03563c389d0a00006a961/

What's the benefit of using a hashtag isolated between '//' as part of the url?

Google Drive:

https://drive.google.com/?usp=chrome_app#shared-with-me
https://drive.google.com/?usp=chrome_app#my-drive
https://drive.google.com/?usp=chrome_app#starred
https://drive.google.com/?usp=chrome_app#recent

How does a URL like Google Drive implement these URLs? Is it using the MVC framework?

Upvotes: 0

Views: 63

Answers (1)

CodeSlayer
CodeSlayer

Reputation: 1327

you can change the setting of url in codeigniter, just open config\config.php and find this code

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';

means the codeigniter only allow those character in url, if you want to add # do the code below

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-#';

Upvotes: 1

Related Questions