Use getCodeBase() rather than full URL