Separate handler for safari and chrome