My FeedDiscussionsHashnode Enterprise
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Sandeep Panda

144 likes

·

5.2K reads

11 comments

Chris Bongers
Chris Bongers
Jul 7, 2020

Very interesting read-up in how this is done.

3
·
Francisco Quintero
Francisco Quintero
Jul 8, 2020

Hey! I was about to comment regarding:

soon realized that Brave browser also blocks third-party cookies when privacy shield is on

but now it's handled! I use Brave and had to disable the Shield to able to comment on blog posts. Just verified and there's no need anymore.

Awesome work!

·
Emin Deniz
Emin Deniz
Jul 17, 2020

Good post, thank you :)
Via SSO in this way, Hashnode seems it doesn't benefit from SPA.

And I have some problem with Chrome History. When I go a blog post from main page, and I want to go back, URL changes to the root domain but the content is the blog post.

Is this problem special for me or general?

·
·1 reply
Sandeep Panda
Sandeep Panda
Author
·Jul 17, 2020

Hi Emin,

Thanks for the comment. SSO doesn’t take away benefits offered by SPA. If you visit any blog home and click on a post you will get a SPA experience. SSO only kicks in when you load the blog or any post for the first time.

And regarding the issue, it was a temporary glitch. Has been fixed now. :)

1
·
Emin Deniz
Emin Deniz
Aug 8, 2020

Hello again,
Today I noticed that medium.com uses same or similar solution for old custom domain blogs. But It has better feature, it only redirect at the first time opened the page. ( Probably, it stores credentials at cookies, and if cookies exist, pass this url query procedure )
But hashnode make it every refresh page.
I am not expert, I only watch network at chrome dev tools.
I have tested on emindeniz99.com hasnode blog ( click blog and about pages ) and hanakamer.com ( refresh(f5) page ) medium blog.
Medium blogs is faster than hashnode at this point. It can be improved.
What do you think about it?
Thanks for the platform.

·
·3 replies
Sandeep Panda
Sandeep Panda
Author
·Aug 14, 2020

Hey, I missed this somehow. Having lunch -- I'll get back soon. :)

1
·
Emin Deniz
Emin Deniz
Aug 17, 2020

Sandeep Panda :) Could you read my reply?

·
Sandeep Panda
Sandeep Panda
Author
·Aug 17, 2020

Emin Deniz Redirects on Hashnode are cheap and fast since it utilizes Cloudflare Workers. It can handle millions of redirects easily. That's the reason we choose to redirect every time without storing that info in cookies. This can be implemented, but then we also need to figure out a logout strategy -- what happens when someone logs out from Hashnode? Should we clear individual cookies from each domain or leave the cookies? This needs some thinking -- but since our redirects use edge caching it doesn't really matter at this time.

Static pages (e.g. /about) on Hashnode don't utilize edge caching currently -- that's why you might have felt that Medium is faster after setting cookies. We are pushing some changes this week which will improve performance of static pages.

If you check your blog home and individual blog posts, you will notice that Medium is never faster than us, even after storing SSO info in a cookie.

You can use this: developers.google.com/speed/pagespeed/insi… and lighthouse to measure.

Hope this answers your question. :)

·
Rajan Panchal
Rajan Panchal
Sep 2, 2020

Great post Sandeep . However I have a question. You still using login cookie to authenticate. Is it not blocked?

·
·1 reply
Sandeep Panda
Sandeep Panda
Author
·Sep 2, 2020

On individual blogs, we authenticate with a short lived JWT. :)

2
·
Dishant Pandya
Dishant Pandya
Aug 19, 2022

Hi! Sandeep Panda , this was very informative article. I am also curious to understand how you handle custom domains just by CNAME pointing to hashnode.network domain. Its very straightfoward compared to other platforms. May be you can share an overview of its architecture.

·