diff --git a/src/components/CatalogPage.tsx b/src/components/CatalogPage.tsx index 0e351b5f7..57c4f1d03 100644 --- a/src/components/CatalogPage.tsx +++ b/src/components/CatalogPage.tsx @@ -103,11 +103,7 @@ export default class CatalogPage extends React.Component { } expandCollectionUrl(url: string): string { - return url - ? `${document.location.origin}/${url}${ - url.includes("?") ? "&" : "?" - }max_cache_age=0` - : url; + return url ? `${document.location.origin}/${url}` : url; } expandBookUrl(url: string): string { diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 5f5a6ae68..6915b48d6 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -108,7 +108,7 @@ export class Header extends React.Component { // Links that will be rendered in a NavItem Bootstrap component. const libraryNavItems = [ - { label: "Catalog", href: "%2Fgroups?max_cache_age=0" }, + { label: "Catalog", href: "%2Fgroups" }, { label: "Hidden Books", href: "%2Fadmin%2Fsuppressed" }, ]; // Other links that will be rendered in a Link router component and are library specific. @@ -231,7 +231,7 @@ export class Header extends React.Component { let library = this.libraryRef.current.getValue(); if (library) { this.context.router.push( - "/admin/web/collection/" + library + "%2Fgroups?max_cache_age=0" + "/admin/web/collection/" + library + "%2Fgroups" ); this.forceUpdate(); } diff --git a/src/components/__tests__/CatalogPage-test.tsx b/src/components/__tests__/CatalogPage-test.tsx index 96a22ed7e..14d9c58b3 100644 --- a/src/components/__tests__/CatalogPage-test.tsx +++ b/src/components/__tests__/CatalogPage-test.tsx @@ -29,7 +29,7 @@ describe("CatalogPage", () => { it("renders OPDSCatalog", () => { const catalog = wrapper.find(OPDSCatalog); expect(catalog.prop("collectionUrl")).to.equal( - host + "/library/collectionurl?max_cache_age=0" + host + "/library/collectionurl" ); expect(catalog.prop("bookUrl")).to.equal(host + "/library/works/bookurl"); expect(catalog.prop("BookDetailsContainer").name).to.equal( @@ -45,7 +45,7 @@ describe("CatalogPage", () => { it("handles the case in which the URL already contains a query string", () => { const queryUrl = "library/collectionurl?samplequery=test"; expect(wrapper.instance().expandCollectionUrl(queryUrl)).to.equal( - host + "/library/collectionurl?samplequery=test&max_cache_age=0" + host + "/library/collectionurl?samplequery=test" ); }); diff --git a/src/components/__tests__/Header-test.tsx b/src/components/__tests__/Header-test.tsx index 01e1dcf87..26d60f80d 100644 --- a/src/components/__tests__/Header-test.tsx +++ b/src/components/__tests__/Header-test.tsx @@ -255,7 +255,7 @@ describe("Header", () => { expect(fullContext.router.push.callCount).to.equal(1); expect(fullContext.router.push.args[0][0]).to.equal( - "/admin/web/collection/bpl%2Fgroups?max_cache_age=0" + "/admin/web/collection/bpl%2Fgroups" ); });