Maybe a JavaScript Cookie approach would suffice then.
Looking into it more, not as straight forward as I thought
The view-source doesn’t expose the post id.
The latest RSS does
<guid isPermaLink="false">meta.discourse.org-post-199819</guid>
as does a topics JSON
"stream":[197269,197272,197286,197289,197290,197291,197292,197297,197298,197299,
197300,197302,197306,197307,197308,197314,197317,197334,197337,197346,
197373,197377,197387,197391,197395,197423,197459,197461,197463,197465,
197467,197469,197509,197510,197511,197512,197513,197514,197515,197516,
197524,197528,197548,197549,197552,197554,197555,197556,197558,197559,
197603,197605,197607,197610,197611,197612,197613,197621,197626,197638,
197776,197799,197808,197814,197815,197835,197845,197851,197886,197888,
197890,197894,197901,197906,197907,197908,197921,197925,197928,197929,
197930,197935,197936,197937,197939,197953,197960,198020,198123,198135,
198146,198149,198150,198151,198194,198212,198230,198231,198238,198244,
198249,198256,198288,198300,198304,198349,198397,198402,198422,198423,
198531,198839,199670,199673,199820]},
I don’t see any “pin” in either the RSS or JSON (unless I missed something)
So if you get the post id from the RSS you would need to take Pinned topics into consideration.
Same it you wanted to get a topics JSON.
I think I’d go with the RSS get enough to make sure all Pinned were got past, and use the highest number eg.
4234, 4303, 5347, 5329 - use 5347