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
On unclean pages we detect that a page could be clean, and then use html5 replace state to fix the url. We also need to do it this case.
detect if current clean url is different to if we re-cleaned it and fix up the replaceState
always serve a canonical url even when cleaned, but make sure it's to the real good cleaned url
also fix the hash tag code so that it always relative to this page and not what we think the page should be (and ideally make that code look it up at run time not at render time??)
brendanheywood
changed the title
Issues with cleanerer urls vs just clean urls, should get instant replaceState
Issues with clean urls vs cleanest urls, should get instant replaceState
Jul 27, 2017
When using a format that renders the default module subpath, it will try to first use the custom path then the id-name version if no custom path. From my understanding, we don't have two URLs and one of them is "better" but we have only the cleaned and uncleaned.
I probably misunderstood something, but I need an example of what is wrong or could be improved.
I understand the second part of the replacestate, where we are losing the anchor # part of the URL that needs to be fixed, but I don't really see how an URL coming through the router (not legacy URL) can have a better version, at least not at this stage.
For the legacy ones, we will apply the uncleaning and it will give the cleaned version (which is already doing) -- it does not give a list of options where we have to choose the best one.
Again, I know I am probably misunderstanding something so let's talk about that when you have some time.
So currently the existing logic for clean urls is they are clean, or they are not.
But we now have the situtions there where are multiple verisons of a url all of which work, but one is considered cleaner, or canonical. ie:
Module id based url:
https://u.catalyst-au.net/course/COMP100/module-1/16-test-unboxpage
Custom stub based url:
https://u.catalyst-au.net/course/COMP100/module-1/test/etst
On unclean pages we detect that a page could be clean, and then use html5 replace state to fix the url. We also need to do it this case.
The text was updated successfully, but these errors were encountered: