# Хочу обновить rel=canonical href с помощью JavaScript

**URL:** <https://meta.discourse.org/t/i-want-to-update-rel-canonical-href-using-java-script/159527>\
**Category:** Product Support\
**Created:** [01.Август.2020 16:00:23 UTC](https://meta.discourse.org/t/i-want-to-update-rel-canonical-href-using-java-script/159527 "2020-08-01T16:00:23Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)\
**Post date:** [02.Август.2020 06:51:20 UTC](https://meta.discourse.org/t/i-want-to-update-rel-canonical-href-using-java-script/159527/6 "2020-08-02T06:51:20Z")

</div>

> [@KranthiKiranGude](#):
>
> Это тот скрипт, который я добавил. Это только для тестирования.

Понял.

Кстати, в условном операторе вашего скрипта не хватает открывающей кавычки…

---

_[View the full topic](https://meta.discourse.org/t/i-want-to-update-rel-canonical-href-using-java-script/159527)._
