Slash (/) vs tilde slash (~/) in style sheet path

  • / – Site root
  • ~/ – Root directory of the application

The difference is that if you site is:

http://example.com

And you have an application myapp on:

http://example.com/mydir/myapp

/ will return the root of the site (http://example.com),

~/ will return the root of the application (http://example.com/mydir/).

Leave a Comment