Skip to content

Instantly share code, notes, and snippets.

@johnrees
Created July 19, 2012 17:49
Show Gist options
  • Save johnrees/3145604 to your computer and use it in GitHub Desktop.
Save johnrees/3145604 to your computer and use it in GitHub Desktop.
Chrome/Webkit Ajax Back Button Fix
<!-- put this inside your view that is not using a layout -->
<% if request.xhr? %>
<script>
if (!document.getElementsByTagName("body")[0]){ location.reload(true); }
</script>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment