Fix losing Referer in Firefox[ location.xxx = xx ]
Fix again
Simplify code