I'm a beginner in rails and making a simple application with it. But every time I refresh or reload a page, it returns 304 not modified status, and ajax doesn't work at all! It really bothers a lot. I have set config.action_controller.perform_caching = false
and added $.ajaxSetup({cache: false});
and even Cache-Control:no-cache
to the application.js.
It just can't work.
Is there any effective way to make ajax working?
Remove Turbolinks from your project. You need to do couple of steps:
turbolinks
gem from Gemfile
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.