Transfer responsibilty of updating canonical from JavaScript to PHP