We're developing a Rails 3 app that uses mobile_fu to display another version of the views for mobile devices. So far so good. However, the mobile phone doesn't render the styles everytime, often it is necess开发者_JAVA百科ary to refresh so the actual formatting shows.
We're wondering if delivering the styles inline is a good idea and if yes, what the best way to do it might be. I thought of a File.read of the .css and yield :css block in the layout-haml.
We understand that this is bad for caching, but I am not sure if the mobile browser cache that much either.. Plus it is just a few dozen extra lines anyway.
This is for mobile only, the desktop version works without problems.
Appreciate any feedback!
Providing some context as to what mobile platforms you're having difficulty with might yield a better answer from the community and would likely be helpful for anyone else struggling with the same devices.
精彩评论