perfect caching; make compat with firefox