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

Appearance settings
Discussion options

Hi Henning,

this is a feature request to change a up-follow request to full page load on the server side. If this is already implemented or requested in another issue, feel free to close the issue immediately.

Example (in Rails):

class ErrorsController < ApplicationController

  def not_found
    up.follow = false
  end

end

This allows to render the same 404 page for different layouts (CSS, JS).

You must be logged in to vote

Replies: 1 comment · 2 replies

Comment options

There's no way in JavaScript to promote the existing AJAX request to a full page load.

Best we could do is to add some header that causes the client to reload the page with a second, identical request. We often do this in development: https://makandracards.com/makandra/79164-unpoly-automatically-show-full-better-errors-page-rails

You must be logged in to vote
2 replies
@denzelem
Comment options

Thanks! Imho a second page request is not suitable when receiving an error page from a rescued exception. This might work (e.g. for a 404 page). For other requests like POST request, internal server errors, e.g. is feels false to me.

@triskweline
Comment options

What about the current error handling doesn't work in your case? Unpoly will already fall back to rendering a <main> or <body> element if the requested target cannot be found in the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💡
Ideas
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.