You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to setup SEO friendly URL's using the guide in a Remix SSR app. Following the guide I've created logic to handle URLs like https://example.org/search/Cameras, but when I visited that URL directly I've seen that there was an additional unnecessary client-side query, it is unnecessary because getServerState already handles "search/Cameras" path and returns the server rendered page with all the relevant hits and refinements. I've tried many different things to get rid of this client-side query without success.
Then I tried a similar thing on the official Next App Router sample. With the initial render you don't see any client-side queries, but when you select anything from the facets, i.e. Apple from the Brands, and refresh that page or copy that url and visit that page in another tab, you can see that a client-side query is performed on that url, for instance https://pmc3gc-3000.csb.app/?instant_search%5BrefinementList%5D%5Bbrand%5D%5B0%5D=Apple Even if the Apple brand selection is done on server and all facets and hits are filtered, there is a client-side query that does not change anything on the page.
So I understand that instant search always performs a client-side query when there is any refinement pre selected. Coming back to the SEO friendly URL logic, since there is always a refinement present on a SEO friendly URL it means there will always be a client-side query. Are there any plans to improve this behavior?
On a side note, I'm trying to create a mobile menu in Remix using NavLinks, and it seems that because of this client-side query my URL is reverted back. Let's say we are on https://example.org/cat/abc and select xyz from the menu, page is re-rendered with the help of Remix loader, the URL changes to https://example.org/cat/xyz and then the client-side query is executed which reverts the URL back to https://example.org/cat/abc. So we are left with a page content coming from xyz but the url says different.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've been trying to setup SEO friendly URL's using the guide in a Remix SSR app. Following the guide I've created logic to handle URLs like https://example.org/search/Cameras, but when I visited that URL directly I've seen that there was an additional unnecessary client-side query, it is unnecessary because getServerState already handles "search/Cameras" path and returns the server rendered page with all the relevant hits and refinements. I've tried many different things to get rid of this client-side query without success.
Then I tried a similar thing on the official Next App Router sample. With the initial render you don't see any client-side queries, but when you select anything from the facets, i.e. Apple from the Brands, and refresh that page or copy that url and visit that page in another tab, you can see that a client-side query is performed on that url, for instance https://pmc3gc-3000.csb.app/?instant_search%5BrefinementList%5D%5Bbrand%5D%5B0%5D=Apple Even if the Apple brand selection is done on server and all facets and hits are filtered, there is a client-side query that does not change anything on the page.
So I understand that instant search always performs a client-side query when there is any refinement pre selected. Coming back to the SEO friendly URL logic, since there is always a refinement present on a SEO friendly URL it means there will always be a client-side query. Are there any plans to improve this behavior?
On a side note, I'm trying to create a mobile menu in Remix using NavLinks, and it seems that because of this client-side query my URL is reverted back. Let's say we are on https://example.org/cat/abc and select xyz from the menu, page is re-rendered with the help of Remix loader, the URL changes to https://example.org/cat/xyz and then the client-side query is executed which reverts the URL back to https://example.org/cat/abc. So we are left with a page content coming from xyz but the url says different.
Regards,
Beta Was this translation helpful? Give feedback.
All reactions