[Fasterfox] Bug in Fasterfox 0.6.5

Kai Risku Kai.Risku at arrak.fi
Mon Oct 3 12:10:17 EDT 2005


I think the following code is buggy:

	 // Don't prefetch things that look like a logout link 
           if(href.indexOf('logout')>0 || href.indexOf('logoff')>0)
continue;

because it doesn't work correctly for HTML that looks like this
	<a href="logout.html">Logout</a>

I.e. indexOf returns zero when the substring is found at the beginning
of the searched string. You should change >0 to >=0 to match that case.
IndexOf returns -1 if it does not find anything.

Regards,
    Kai

--
Kai.Risku at arrak.fi     GSM  +358-40-767 8282
Oy Arrak Software Ab   http://www.arrak.fi
 




More information about the Fasterfox mailing list