Tag Archives: url

Firefox new tab focus fix

After some update, like 17…etc, i’ve really discouraged cause by FF focus on address bar when new tab is opening. To fix issue in stall next add-on.

newTabHome_0.4.3_hacked

Thanx to https://support.mozilla.org/en-US/questions/791190

C#

Response.Redirect and Thread was being aborted in C#.NET

To prevent error “Thread was being aborted” while Response.Redirect() method execute, use second parameter equals to FALSE:

    Response.Redirect("http://google.com", false);

Also proof,
http://stackoverflow.com/questions/1433448/thread-was-being-aborted
http://programming360.blogspot.com/2009/10/thread-was-being-aborted.html

PHP

Get the Current Page URL


It’s often to know current page url. Here is the snipet:

function getCurrentPageUrl()
{
	$strPageUrl = 'http';
	
	if ($_SERVER["HTTPS"] == 'on')
		$strPageUrl .= 's';
	
	$strPageUrl .= '://' . $_SERVER["SERVER_NAME"];
	
	if ($_SERVER["SERVER_PORT"] != '80')
		$strPageUrl .=  ':' . $_SERVER["SERVER_PORT"];
	
	return $strPageUrl . $_SERVER["REQUEST_URI"];
}

Very simple.