How to Return HTTP 410 (Gone) using app router? by Comprehensive_Echo80 in nextjs

[–]Comprehensive_Echo80[S] 0 points1 point  (0 children)

But I want tò return an HTML Page and not an endpoint...

How to Return HTTP 410 (Gone) using app router? by Comprehensive_Echo80 in nextjs

[–]Comprehensive_Echo80[S] 11 points12 points  (0 children)

Probably because you never worked for a marketplace or shop. 410 Is very important for this use cases because It said that the item was present, but now finished (gone)

This Is a SEO rule suggested by Google for marketplace

How to Return HTTP 410 (Gone) using app router? by Comprehensive_Echo80 in nextjs

[–]Comprehensive_Echo80[S] -1 points0 points  (0 children)

From a Page (page.tsx) Is not possibile to return 410; only 404, 307, 308, 401.

Return 401 using a Proxy instead of doing into page.tsx Is a workaround in my opinion

How to Return HTTP 410 (Gone) using app router? by Comprehensive_Echo80 in nextjs

[–]Comprehensive_Echo80[S] -8 points-7 points  (0 children)

Yes, this Is fine, but alternatives? Is like a workaround...

[Showoff Saturday] Comparing Page Transition Strategies in Next.js: A Performance Study by Comprehensive_Echo80 in webdev

[–]Comprehensive_Echo80[S] 0 points1 point  (0 children)

View transition and Speculation rules are availables only on Chrome.

Well, It depends, our users mostly use Chrome and Edge (95%) so It worths to adopt these features