# Intra-post permalink

**URL:** <https://meta.discourse.org/t/intra-post-permalink/56880>\
**Category:** Support\
**Created:** [February 3, 2017, 8:30pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880 "2017-02-03T20:30:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmsachs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jmsachs/32/107682_2.png) [@jmsachs](https://meta.discourse.org/u/jmsachs)\
**Post date:** [February 3, 2017, 8:30pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/1 "2017-02-03T20:30:22Z")

</div>

Is there any way to have an intra-post permalink with only a URL hash?

In other words, if I want to link to reply #3, can I do that? The regular permalink is a full URL, and if I add that, then it requires a page reload. Since it’s the same page, is there any way to link to a reply with only a URL hash?

- [example of full URL link](https://meta.discourse.org/t/intra-post-permalink/56880/3)

* * *

test: [quote=“elijah, post:4, topic:56880”]well the `[quote]` syntax works, but it creates an inline quote, I just want a link.[/quote]

---

<div class="post-metadata">

**Author:** ![jmsachs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jmsachs/32/107682_2.png) [@jmsachs](https://meta.discourse.org/u/jmsachs)\
**Post date:** [February 3, 2017, 8:30pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/2 "2017-02-03T20:30:37Z")

</div>

test reply 1…

---

<div class="post-metadata">

**Author:** ![jmsachs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jmsachs/32/107682_2.png) [@jmsachs](https://meta.discourse.org/u/jmsachs)\
**Post date:** [February 3, 2017, 8:30pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/3 "2017-02-03T20:30:46Z")

</div>

test reply 2…

---

<div class="post-metadata">

**Author:** ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)\
**Post date:** [February 3, 2017, 8:37pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/4 "2017-02-03T20:37:15Z")

</div>

Are you asking for something like the link you get with

```plaintext
[quote="USER, post:N, topic:M, full:true"]

```

?

You could possibly add just stub quotes.

> [@jmsachs](#):
>

---

<div class="post-metadata">

**Author:** ![jmsachs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jmsachs/32/107682_2.png) [@jmsachs](https://meta.discourse.org/u/jmsachs)\
**Post date:** [February 3, 2017, 8:58pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/5 "2017-02-03T20:58:59Z")

</div>

[quote=“elijah, post:4, topic:56880”]

> [@USER](#):
>

Sort of, but I just want to make it into a link that ends up as a URL fragment (intra-page link). See my “example of full URL link” in the original post.

---

<div class="post-metadata">

**Author:** ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)\
**Post date:** [February 3, 2017, 11:05pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/6 "2017-02-03T23:05:01Z")

</div>

Off-hand I don’t think that is doable, but it makes it clear what you want.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [February 3, 2017, 11:09pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/7 "2017-02-03T23:09:51Z")

</div>

Incorrect, it only requires a page reload if the target post is not currently loaded. @eviltrout can confirm.

---

<div class="post-metadata">

**Author:** ![jmsachs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jmsachs/32/107682_2.png) [@jmsachs](https://meta.discourse.org/u/jmsachs)\
**Post date:** [February 6, 2017, 3:16pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/8 "2017-02-06T15:16:33Z")

</div>

> [@codinghorror](#):
>
> Incorrect, it only requires a page reload if the target post is not currently loaded.

odd, we have a Discourse server at our company and if I use full URL links, it does cause a page reload. If a page with URL A links to a page with URL B, how can it avoid a page reload? It seems to work correctly on this page (I still don’t understand how), but maybe that’s just a really fast operation that appears seamless to me.

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [February 6, 2017, 3:25pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/9 "2017-02-06T15:25:34Z")

</div>

> [@jmsachs](#):
>
> If a page with URL A links to a page with URL B, how can it avoid a page reload? It seems to work correctly on this page (I still don’t understand how)

The JavaScript doing that magic 🙂

> [@jmsachs](#):
>
> we have a Discourse server at our company and if I use full URL links, it does cause a page reload.

It may behaved like that because of some other reason. Can you please try again?

---

<div class="post-metadata">

**Author:** ![jmsachs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jmsachs/32/107682_2.png) [@jmsachs](https://meta.discourse.org/u/jmsachs)\
**Post date:** [February 6, 2017, 3:26pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/10 "2017-02-06T15:26:49Z")

</div>

> [@vinothkannans](#):
>
> The JavaScript doing that magic 🙂

Please no citations of “magic”; if you know how it works, please let me know. I’m inspecting the link and I see no onclick handler, if something is going on, it is very subtle and I don’t understand.

I guess it must be some evil Ember magic [Preventing and Retrying Transitions - Routing - Ember Guides](https://guides.emberjs.com/v1.10.0/routing/preventing-and-retrying-transitions/)

---

<div class="post-metadata">

**Author:** ![jmsachs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jmsachs/32/107682_2.png) [@jmsachs](https://meta.discourse.org/u/jmsachs)\
**Post date:** [February 6, 2017, 3:31pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/11 "2017-02-06T15:31:57Z")

</div>

> [@vinothkannans](#):
>
> It may behaved like that because of some other reason. Can you please try again?

I did try again, it is still doing a page reload, which again, is the behavior I would expect. Both our company’s Discourse instance and this Discourse instance appear to be using 1.8.0.beta4, although different git hashes:

this page: `<meta name="generator" content="Discourse 1.8.0.beta4 - https://github.com/discourse/discourse version ba115480ba782587f07cb9d08ac7a77927910a71">`

our server: `<meta name="generator" content="Discourse 1.8.0.beta4 - https://github.com/discourse/discourse version c36dda70aeb6e97efaf7ad0cb932df18f0281722">`

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [February 6, 2017, 3:34pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/12 "2017-02-06T15:34:42Z")

</div>

Have you tried adding a space before the link?

[Intra-post permalink - #3 by jmsachs](https://meta.discourse.org/t/intra-post-permalink/56880/3)

---

<div class="post-metadata">

**Author:** ![jmsachs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jmsachs/32/107682_2.png) [@jmsachs](https://meta.discourse.org/u/jmsachs)\
**Post date:** [February 6, 2017, 3:42pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/13 "2017-02-06T15:42:03Z")

</div>

> [@zogstrip](#):
>
> Have you tried adding a space before the link?

Adding a space where?

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [February 6, 2017, 3:45pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/14 "2017-02-06T15:45:24Z")

</div>

> [@jmsachs](#):
>
> Adding a space where?

> [@zogstrip](#):
>
> adding a space **before the link**

When it’s on it’s own line, adding a space before the link will prevent it from being oneboxed.

* * *

```
https://meta.discourse.org/t/intra-post-permalink/56880/3

```

renders as

> [@Intra-post permalink](https://meta.discourse.org/t/intra-post-permalink/56880/3):
>
> test reply 2…

whereas

```
 https://meta.discourse.org/t/intra-post-permalink/56880/3

```

renders as

[Intra-post permalink - #3 by jmsachs](https://meta.discourse.org/t/intra-post-permalink/56880/3)

---

<div class="post-metadata">

**Author:** ![jmsachs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jmsachs/32/107682_2.png) [@jmsachs](https://meta.discourse.org/u/jmsachs)\
**Post date:** [February 6, 2017, 3:49pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/15 "2017-02-06T15:49:49Z")

</div>

oh, I see, that explains what “oneboxed” means and why it occurs. Yes, if I put a link all by itself it does that, but if I do something like

```
[link](http://myserver/t/test-test-test-test-is-a-test-test-argh/343/3)

```

then it displays properly, but the “magic” page reload interception logic doesn’t work, I get a normal page reload to the URL [http://myserver/t/test-test-test-test-is-a-test-test-argh/343/3](http://myserver/t/test-test-test-test-is-a-test-test-argh/343/3)

The only difference I can see is that our server is http:// (inside company firewall + noncritical server, so it’s much less of a concern) rather than https:// – could this be the difference?

---

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [February 6, 2017, 3:51pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/16 "2017-02-06T15:51:39Z")

</div>

> [@jmsachs](#):
>
> The only difference I can see is that our server is http:// (inside company firewall + noncritical server, so it’s much less of a concern) rather than https:// – could this be the difference?

yes, switching between http and https could be causing the page reloads.

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [February 6, 2017, 3:52pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/17 "2017-02-06T15:52:09Z")

</div>

> [@jmsachs](#):
>
> The only difference I can see is that our server is http:// (inside company firewall + noncritical server, so it’s much less of a concern) rather than https:// – could this be the difference?

The scheme should have no impact **unless** you have your instance misconfigured (ie. have it think it should use `https` but there still are links using `http`).

---

<div class="post-metadata">

**Author:** ![jmsachs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jmsachs/32/107682_2.png) [@jmsachs](https://meta.discourse.org/u/jmsachs)\
**Post date:** [February 6, 2017, 3:52pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/18 "2017-02-06T15:52:09Z")

</div>

no, I’m not _switching_ between http:// and https:// – our server is http:// and the links are http://

---

<div class="post-metadata">

**Author:** ![jmsachs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jmsachs/32/107682_2.png) [@jmsachs](https://meta.discourse.org/u/jmsachs)\
**Post date:** [February 6, 2017, 3:52pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/19 "2017-02-06T15:52:55Z")

</div>

> [@zogstrip](#):
>
> The scheme should have no impact unless you have your instance misconfigured (ie. have it think it should use https but there still are links using http).

Is there a way I can troubleshoot this? I have admin privileges, I just have no clue what to look for.

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [February 6, 2017, 3:57pm UTC](https://meta.discourse.org/t/intra-post-permalink/56880/20 "2017-02-06T15:57:53Z")

</div>

I can’t understand why it is happening like that. Can you please share a screencast? You may hide your sensitive details.

[Next page](https://meta.discourse.org/t/intra-post-permalink/56880.md?page=2)
