How to get the original url before redirection in SharePoint 2013 -
basically need reverse thing of question:
namely, if user inputs "http://sp2013/my" in browser, redirect "http://sp2013/my/default.aspx". need url before redirection happens (http://sp2013/my). i.e., need way distinguish these 2 cases:
- case 1. user inputs "http://sp2013/my" in browser;
- case 2. user clicks link "http://sp2013/my/default.aspx" in page.
what have page object, hostsite, hostweb, personalsite, personalweb object, etc.
thank you
for case 2: if user clicks link sp2013/my or sp2013/my/default.aspx, document.referrer
returns url of page user clicked link on.
there doesn't seem way explicitly answer case 1, @ least not javascript. however, if document.referrer
returns empty string, user did not click link. there no way tell whether entered sp2013/my or sp2013/my/default.aspx browser, or page on.
Comments
Post a Comment