[英]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.