Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Gerrit URLs

Alex Blewitt <alex.blewitt@xxxxxxxxx> wrote:
> As an observation, the Gerrit URLs have a lot of # in them, rather than 
> being a more bookmarkable URL. The only problem I've noticed is that some 
> URL shortening services don't capture the # on them.
> Is there any reason that Gerrit uses URLs of the form:


The entire Gerrit UI is implemented in AJAX-y JavaScript.  There is
only one page with one giant chunk of JavaScript for the browser
to visit.  Navigation between "pages" is implemented by visiting
different anchors within the same document, and the JavaScript
updates the DOM to show the new display.

Using a URL like you suggested where the location is embedded in the
path portion rather than the anchor portion would cause the browser
to need to reload the document HTML, reinitialize the JavaScript,
and basically start all over again.

Why is it like this?  Because we chose to write the UI in GWT[1]
and current browsers don't supoprt changing the path without
reloading everything.

The URLs are bookmarkable as-is, its just that some URL services are
stupid and don't know how to include anchors.  Blame those services,
not Gerrit.  Its no different than if you wanted to do a short URL
to section of a 1000 page document which is served as a
single 4 MiB HTML file; the anchor is relevant information that
should be part of the shortend URL redirect.



Back to the top