6

In URL https://books.google.com/books?id=rAy-NliGEPMC&lpg=PA126&pg=PA126#v=onepage&q&f=false, what do the following query strings mean:

  • "lpg=PA126"
  • "pg=PA126#v=onepage"
  • "q"
  • "f=false"?

If I want to specify the URL to a particular page in a book, shall I modify the value of "lpg" or the one of "pg"?

1 Answer 1

6

In the given example, the URL is: https://books.google.com/books?id=rAy-NliGEPMC&lpg=PA126&pg=PA126#v=onepage&q&f=false

The URL could also be written as: https://books.google.com/books?id=rAy-NliGEPMC&pg=PA126#v=onepage&f=false

The URL syntax is:

  • id: The book ID (id=rAy-NliGEPMC)
  • pg: The page number (pg=PA126)
  • lpg: The landing page (lpg=PA126) – see below for more info
  • v: Whether viewed as a centerfold or a single page (v=onepage OR v=twopage)
  • f: Whether to hide the left hand side-bar or not (f=false OR f=true)

Although not officially documented, the lpg= parameter refers to the landing page to the Google Book.

How this works in our example:

  • When you first land (through a link) to page 126, the link is: https://books.google.com/books?id=rAy-NliGEPMC&pg=PA126#v=onepage&q&f=false

  • When you want to share the link by clicking the button with the chain-link icon while on the same page, the copied link changes to: https://books.google.com/books?id=rAy-NliGEPMC&lpg=PA126&pg=PA126#v=onepage&q&f=false

    copied Google Books page URL same as landing page

    (It adds the parameter &lpg=PA126 before &pg=PA126.)

  • If you then go to page 137 (for example) and then try to share the link, the new copied link becomes: https://books.google.com/books?id=rAy-NliGEPMC&lpg=PA126&pg=PA137#v=onepage&q&f=false

    copied Google Books page URL other than landing page

    (It changes &pg=PA126 to &pg=PA137, but the &lpg=PA126 parameter is unchanged.)

2
  • Web services are by definition stateless. I guess with lpg Google Books becomes stateful
    – Tim
    Commented Aug 21, 2020 at 12:35
  • Well... That's Google for you :/ Commented Aug 21, 2020 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.