-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stripping trailing slash from PHP Script Path and Javascript Path causes unnecessary webserver redirects when using "js/" #30
Comments
Hi Graham, I don't think there's any specific reason for removing trailing slashes, just a simple way of normalizing the file name. I wasn't even aware that omitting the file name was an option in Matomo. I've pushed an update to the If you're trying to get around ad blockers, you might find the discussion in issue #3 interesting. Cheers! |
Yeah, I read that thread on adblockers, but it seemed like a whole lotta work when Matamo have already addressed it by allowing you to use the path js/ instead of piwik.js and js/ instead of piwik.php. Its all detailed in their README file https://github.com/matomo-org/matomo/blob/master/js/README.md I'll check out the update to 2.0.2 branch. Like I say, its low priority. It still works, it just means there is an unnecessary redirect from js to js/ |
I have applied the 2.0.2 dev commit to my local install and all seems fine. https://tools.pingdom.com/ now reports 2 less redirects on every page of my site. :) |
Look forward to the next release. Best wishes. Graham |
v2.0.2 is released now. Thank you for your feedback! |
Hi,
To get around the adblock issue, piwik (or should I now say Matamo) recommend that you use the script paths "js/" instead of "piwik.js" and "piwik.php" as "js/" is automatically handled by Matamo, and not blocked by Adblock.
However, when the henhed module makes the call, the trailing slash is removed and the url "js" is called. This causes the webserver to respond with a redirect to "js/". Whilst it all still works, it means two webserver calls instead of one for every page view.
What is the reason for removing the trailing slash?
Thanks
Graham
The text was updated successfully, but these errors were encountered: