We apologize for the instability of composr.app and appreciate your patience. We are working on the statistics addon and trying to find an optimal way to store and render data. Unfortunately, we have yet to find a solution that can handle the traffic (and therefore, tens of millions of statistical records) of composr.app. We're working hard on one.
#3525 - $util.url is naive
This is a spacer post for a website comment topic. The content this topic relates to: #3525 - $util.url is naive
Fixed by https://github.com/ocproducts/composr/commit/6808c50844db063cc1a0dda2171c38cbb1eca8f0
I introduced a new function called $util.rel() for producing root-relative URLs and used it throughout the JS where appropriate. $util.url() is a general purpose function that returns a "URL"[1] instance, which can be used for URL manipulation, modifying the query string etc. but unfortunately it only works with absolute URLs.
The reason for using the tempcode {$BASE_URL} in $util.url() is to avoid UTIL.js having any dependency on CMS.js. $cms.getBaseUrl() would work too, should I switch?
I introduced a new function called $util.rel() for producing root-relative URLs and used it throughout the JS where appropriate. $util.url() is a general purpose function that returns a "URL"[1] instance, which can be used for URL manipulation, modifying the query string etc. but unfortunately it only works with absolute URLs.
The reason for using the tempcode {$BASE_URL} in $util.url() is to avoid UTIL.js having any dependency on CMS.js. $cms.getBaseUrl() would work too, should I switch?
1: https://developer.mozilla.org/en-US/docs/Web/API/URL