简体   繁体   English

不允许将CSS携带到上一页(单击浏览器后退按钮后)

[英]Not allowing CSS to be carried to previous page (after clicking browser back button)

My webapp is running into the issue of CSS being carried back to the original page when a user clicks the back button in the browser. 当用户单击浏览器中的“后退”按钮时,我的webapp遇到了CSS被带回到原始页面的问题。

Here's my original page: 这是我的原始页面: 在此处输入图片说明

Here's an outside page I link to in the navigation: 这是我在导航中链接到的外部页面: 在此处输入图片说明

Here's what happens after I click the back button (notice the heading and background color): 单击后退按钮后,会发生以下情况(请注意标题和背景色): 在此处输入图片说明

I tried to solve this by using <body onload="document.refresh();"> based on a stackoverflow suggestion but it didn't solve my issue. 我试图通过基于stackoverflow建议的<body onload="document.refresh();">解决此问题,但并不能解决我的问题。

I'm using the Ruby on Rails framework, if that helps at all. 我正在使用Ruby on Rails框架,如果有帮助的话。

Are you using Turbolink (check out your Gemfile, it's a default gem in Rails 4)? 您是否正在使用Turbolink(签出您的Gemfile,这是Rails 4中的默认gem)?
You may want to disable it. 您可能要禁用它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 页面重定向后单击浏览器后退按钮后上一页未加载 - Previous page not loading after clicking browser back button after a page redirection 单击浏览器的“后退”按钮时,返回上一页的上一个位置 - Go Back to the Previous Location on Previous Page when Clicking Browser Back Button 付款后在浏览器中单击后退按钮可返回到其他页面 - Return to different page when clicking back button in browser after payment 得到确认页面后点击浏览器返回按钮 - Clicking the browser back button after getting the confirmation page 单击浏览器后退按钮时,将用户带回上一页滚动到的位置 - Take User Back to Where They Scrolled to on previous page when clicking Browser Back Button 如何通过在javascript中单击浏览器的后退按钮将页面恢复到之前的状态 - How to take back a page to its previous state by clicking the back button of the browser in javascript 单击浏览器后退按钮时如何转到当前页面的上一页 - How to go previous page of current page , while clicking browser back button 通过单击后退按钮重新加载上一页 - Reload the previous page by clicking the back button 当我单击浏览器的“后退”按钮时,它应该转到同一页面的上一个活动 - when I clicking on Back button of browser , it should go to the previous activity of the same page 防止转到浏览器后退按钮上的上一页 - Prevent going to the previous page on browser back button
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM