private function _downloadFileToTmpAndGetNewHref ($item, $minify = FALSE) {
		$path = $item->path;
		$tmpFileFullPath = $this->getTmpDir() . '/external_js_' . md5($path) . '.js';
		if (self::$fileRendering) {
			if (file_exists($tmpFileFullPath)) {
				$cacheFileTime = filemtime($tmpFileFullPath);
			} else {
				$cacheFileTime = 0;
			}
			if (time() > $cacheFileTime + self::EXTERNAL_MIN_CACHE_TIME) {
				while (TRUE) {
					$newPath = $this->_getPossiblyRedirectedPath($path);
					if ($newPath === $path) {
						break;
					} else {
						$path = $newPath;
					}
				}
				$fr = fopen($path, 'r');
				$fileContent = '';
				$bufferLength = 102400; // 100 KB
				$buffer = '';
				while ($buffer = fread($fr, $bufferLength)) {
					$fileContent .= $buffer;
				}
				fclose($fr);
				if ($minify) {
					$fileContent = $this->_minify($fileContent, $path);
				}
				$this->saveFileContent($tmpFileFullPath, $fileContent);
				$this->log("External js file downloaded ('$tmpFileFullPath').", 'debug');
			}
		}
		$tmpPath = substr($tmpFileFullPath, strlen($this->getAppRoot()));
		return $tmpPath;
	}