Skip to content

Load More demo does not update URL after loading more results #113

Open

Description

@nickshanks

The Load More demo should also be updating the URL using the History API to reflect the number of results being shown, so that reloading the page/switching browsers/sharing the link all get you back to the place you were before that action.

When loading a page with a URL that specifies how many results to show, that number needs to be honoured for the above to work. For a demo this can be done client-side but ought to be done server-side for real code.

Activity

  1. micmath commented on Jun 18, 2019

    @micmath
    Contributor

    Do you mean like /search/football/results?pages=10 or similar, where the number of pages to show is encoded in the URL -- in that example, pages 1 through 10 would be visible upon opening the URL?

    This idea came up in a project I worked on to implement the BBC Academy Search. As a team we eventually decided that, when implemented serverside it was too inviting of an attack vector for someone who might want to DOS the system by simply hitting a lot of URLs like /search/football/results?pages=10000. We tried to make it more of a manual effort for someone to load multiple pages of results by requiring they make multiple requests for single pages to the server and then stitching those together on the client.

    note: Academy later rewrote their search page to support for the page=n pattern, and I can reliably 500 their site now by simply manipulating the search parameters in trivial ways

    There might be valid usability reasons not to implement this too, but basically I think it's more than just a technical question of can it be done. Unfortunately there isn't any guidance from GEL about what the user experience should be and I can't find any live examples of "load more" being used anywhere else on the BBC.

    Makes me question if we should be documenting it in GEF at all...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions