Support the ongoing development of Laravel.io →
Requests Input
Last updated 1 year ago.
0

Found a solution using JS. Ref: http://stackoverflow.com/questions/1397329/how-to-remove-the-h...


// Remove # sign after facebook login
if ( (location.hash == "#_=_" || location.href.slice(-1) == "#_=_") ) {
	removeHash();
}

function removeHash() {
	var scrollV, scrollH, loc = window.location;
	if ('replaceState' in history) {
		history.replaceState('', document.title, loc.pathname + loc.search);
	} else {
		// Prevent scrolling by storing the page's current scroll offset
		scrollV = document.body.scrollTop;
		scrollH = document.body.scrollLeft;

		loc.hash = '';

		// Restore the scroll offset, should be flicker free
		document.body.scrollTop = scrollV;
		document.body.scrollLeft = scrollH;
	}
}

Last updated 1 year ago.
0

if you use this below code also it does same

parent.location.hash = '';

But it's (your code ) not removing the '#' from url . Any idea how to remove the # character from url ?

0

Sign in to participate in this thread!

Eventy

Your banner here too?

dgorack dgorack Joined 4 Sep 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.