# Running Discourse in an iframe

**URL:** <https://meta.discourse.org/t/running-discourse-in-an-iframe/54931>\
**Category:** Product Support\
**Created:** [2016 年 12 月 29 日午後 2:45 UTC](https://meta.discourse.org/t/running-discourse-in-an-iframe/54931 "2016-12-29T14:45:26Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![fishb6nes](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fishb6nes/32/121291_2.png) [@fishb6nes](https://meta.discourse.org/u/fishb6nes)\
**Post date:** [2016 年 12 月 29 日午後 5:35 UTC](https://meta.discourse.org/t/running-discourse-in-an-iframe/54931/7 "2016-12-29T17:35:33Z")

</div>

Well, another issue is the URL not updating if the user switches views in the iframe. Which would raise another issue with `document.getElementById("iframe_id").contentWindow.location.href` not being available cross origin. It might be a better idea to serve Discourse out of a folder and keep everything on the same origin.

---

_[View the full topic](https://meta.discourse.org/t/running-discourse-in-an-iframe/54931)._
