This repository was archived by the owner on Oct 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Refactor: navigation paths
jblas edited this page Apr 25, 2011
·
23 revisions
The purpose of this document is mainly for me to get my head around all of the factors involved with loading files in jQuery Mobile (JQM). Path handling within jQuery mobile is probably the most delicate area of the code and many of us have tweaked and broken specific use cases at various times. I'm hoping that by enumerating factors, and specific use cases, that we can avoid breaking things in the future.
When I say file loading, I am specifcally talking about the code within jquery.mobile.navigation.js that handles clicks for all links, and the changePage() function itself.
At a minimum, I would say that we need to support the following types of paths:
- Document Relative Examples:
- foo.html
- dir1/dir2/
- dir1/dir2/foo.html
- ../../
- ../../foo.html
- ../../dir1/dir2/foo.html
- Site Relative Examples:
- /
- /foo.html
- /dir1/dir2/
- /dir1/dir2/foo.html
- Protocol Relative Examples:
- //company.com/
- //company.com/foo.html
- //company.com/dir1/dir2/
- //company.com/dir1/dir2/foo.html
- Absolute Examples: http://company.com/
- http://company.com/dir1/dir2/
- http://company.com/dir1/dir2/foo.html
- http://company.com:8080/
- http://company.com:8080/dir1/dir2/
- http://company.com:8080/dir1/dir2/foo.html
- file:///foo.html
- file:///dir1/dir2/foo.html
- file:///C:/foo.html
- file:///C:/dir1/dir2/foo.html