Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: remove deprecated res.redirect('back') from Express 3.x and 4.x API docs#2126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@vini4721
Copy link

Fixes#1834

Changes

  • Removed deprecatedres.redirect('back') example from Express 3.x API documentation
  • Removed deprecatedres.redirect('back') example and deprecation notice from Express 4.x API documentation

Reason

Theres.redirect('back') method was deprecated in Express 4.x and completely removed in Express 5.x. These examples should no longer appear in the API documentation as they may confuse users.

Related

  • The migration guides correctly explain that'back' is no longer supported and recommend usingreq.get('Referrer') || '/' instead
  • Express 5.x documentation already does not include this deprecated example

@vini4721vini4721 requested a review froma team as acode ownerDecember 2, 2025 07:43
@netlify
Copy link

netlifybot commentedDec 2, 2025
edited
Loading

Deploy Preview forexpressjscom-preview ready!

NameLink
🔨 Latest commit363c818
🔍 Latest deploy loghttps://app.netlify.com/projects/expressjscom-preview/deploys/692ffcb4d6ae6000083f95d0
😎 Deploy Previewhttps://deploy-preview-2126--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify project configuration.

@krzysdz
Copy link
Contributor

Deprecated API should be marked as such (and it is), not removed from documentation if it still exists. It was removed from Express 5 docs, because it does not exist in Express 5. If you see somewhere in old coderes.redirect('back'), you may want to check in the documentation what does it do. If the documentation is removed, it will be very confusing for users.

Your PR not only removes documentation for a feature that still exists (talking about Express 4), but also the recommendation how to replace it.

@vini4721
Copy link
Author

Thank you for the feedback@krzysdz! I understand the issue now.

I need clarification: Issue#1834 mentions thatres.redirect('back') appears in the Express 5 API documentation. However, when I searched the repository, I found it in the 3.x and 4.x files:

  • _includes/api/en/3x/res-redirect.md
  • _includes/api/en/4x/res-redirect.md

I did NOT find a separate 5.x API documentation file forres.redirect().

Could you please point me to which specific file contains the Express 5 API reference that needs to be updated? I want to fix this correctly by only removing it from Express 5 docs while keeping it in 3.x/4.x docs where it's properly marked as deprecated.

The deprecated feature should remain documented in Express 3.x and 4.xwhere it still exists. Only Express 5 removed this feature.
@github-actions
Copy link
Contributor

🚦 Lighthouse Results (Mobile & Desktop)

URLDevicePerfA11yBest Practices
/mobile🔴 62🟢 100🟢 96
/en/blog/posts.htmlmobile🟠 78🟢 96🟢 92
/en/5x/api.htmlmobile🟢 97🟢 95🟢 96
/desktop🟢 100🟢 100🟢 96
/en/blog/posts.htmldesktop🟢 100🟢 96🟢 92
/en/5x/api.htmldesktop🟢 99🟢 95🟢 96

@krzysdz
Copy link
Contributor

The 5.x documentation forres.redirect() is under_includes/api/en/5x/res-redirect.md and the issue#1834 was fixed by PR#1835 almost 9 months ago. If you're looking for problems to fix, closed issues aren't the best place to start.

Copy link
Member

@bjohansebasbjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Hi, thanks for your contribution. This PR doesn’t seem to have any changes, unless GitHub is broken and not showing them to me.

If it’s as the title says, we don’t need to remove those references in the other APIs, as@krzysdz already mentioned.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@bjohansebasbjohansebasbjohansebas requested changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Remove reference tores.redirect('back').

3 participants

@vini4721@krzysdz@bjohansebas

[8]ページ先頭

©2009-2025 Movatter.jp