Is there any option without anchor link when use multiple page?

52 views Asked by At

I'm use Jquery Mobile and there is 3 page. I need user open the page by his app and share the link to his friends.

But If I use the link way, like:

<!-- this is a second page -->
<div data-role="page"  id="secondPage"><div/>

<!-- this is navigator from first page -->
<div><a href="#secondPage" >secondPage</a></div>

If I click the link, it will navigate to second page, but it will also change the website link address(add #secondPage). then if user share the address , the second page will display every time his friends open it.

So Is there any way to replace the anchor link way? or resolved this problem?

Thank.

1

There are 1 answers

1
geoyws On

I copied and pasted this solution from: Remove querystring from URL

var testURL = '/Products/List#discounted?SortDirection=dsc&Sort=price&Page=3&Page2=3';
testURL.split('#')[0].split('?')[0];    // Returns: "/Products/List"

This was the winner among the other alternatives.