简体   繁体   中英

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.

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.

I'm using the Ruby on Rails framework, if that helps at all.

Are you using Turbolink (check out your Gemfile, it's a default gem in Rails 4)?
You may want to disable it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM