if (index >= 0) { String historic = (String) history.get(index); if (historic.equals(baseUrl)) return; } index++; for (int i = index; i < history.size(); history.remove(i)) ; history.add(index, baseUrl);
    public void setBaseURL(String url) {        baseUrl = resolveURI(url);    }