# Minor Issue: Javascript code on preview page is deprecated

**URL:** <https://community.prismic.io/t/minor-issue-javascript-code-on-preview-page-is-deprecated/1218>\
**Category:** Developing with Prismic\
**Created:** [July 14, 2020, 3:19pm UTC](https://community.prismic.io/t/minor-issue-javascript-code-on-preview-page-is-deprecated/1218 "2020-07-14T15:19:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hola](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/hola/32/516_2.png) [@hola](https://community.prismic.io/u/hola)\
**Post date:** [July 14, 2020, 3:19pm UTC](https://community.prismic.io/t/minor-issue-javascript-code-on-preview-page-is-deprecated/1218/1 "2020-07-14T15:19:45Z")

</div>

Hello,

I would just like to point out that the javascript copy and paste code on the preview page of a repository throws a console log saying it's deprecated. Maybe it should be updated to the correct one we should use?

The console thankfully gives the proper code to use, but it also points to the javascript documentation which refers back to the preview page.

---

<div class="post-metadata">

**Author:** ![marcellothearcane](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/marcellothearcane/32/224_2.png) [@marcellothearcane](https://community.prismic.io/u/marcellothearcane)\
**Post date:** [July 15, 2020, 6:00am UTC](https://community.prismic.io/t/minor-issue-javascript-code-on-preview-page-is-deprecated/1218/2 "2020-07-15T06:00:17Z")

</div>

This has been answered before!

> [@Deprecated prismic preview script](https://community.prismic.io/t/deprecated-prismic-preview-script/1065):
>
> Hello, I am currently receiving After implementing the suggested script in the \_document.js of my next.js app, I am unable to preview the content. I went to the documentation and it is suggesting the deprecated version. Here is the script I am trying to implement for reference script async defer src="[//static.cdn.prismic.io/prismic.js?repo=my-test-repo&new=true](https://static.cdn.prismic.io/prismic.js?repo=my-test-repo&new=true)" (had to remove the \<\> so it would appear in this post) I would appreciate any guidance. Thank you!

---

<div class="post-metadata">

**Author:** ![Levi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/levi/32/24_2.png) [@Levi](https://community.prismic.io/u/Levi)\
**Post date:** [December 10, 2021, 9:15am UTC](https://community.prismic.io/t/minor-issue-javascript-code-on-preview-page-is-deprecated/1218/4 "2021-12-10T09:15:36Z")

</div>

Opened on December 10, 2021, 9:15am UTC


