4

mobile browsers not refreshing stylesheets.

this is the worst thing that mankind ever did. I mean, when you are trying to design a website and the changes you make to the css are not loaded by the browser, you have no clue wtf is going on. There is no way to make the browser refresh the stylesheet. Reloading, entering the url manually, reopening the tab, restarting the browser, nothing works. The only fix is to manually clear the app's cache in android settings.

The strange thing here is that at first the stylesheet gets refreshed like it should, but after some time the cache seems to be capped and it wont load sh*t...

This is soooo frustrating :(((

Comments
  • 2
    We have been there broski!

    Just add some cache busting tag to your path like
    app.css?v=randomTag
    and before you are going to deploy on your production server just modify the tag so clients will know your style is updated.

    (It is a secret shaolin technique called cache busting: works with every other path too like images and scripts)
  • 0
    I can totally relate to that, this is one of the reasons I've installed extension of developers tool in desktop chrome. But wtf am I supposed to do with mobile phones.
    *most of the time I resize my browser to see changes.
  • 1
    Try chrome with phone mode or whatever it's called. You can debug your styles there and only test the final version every now and then on a phone

    Also, you can make your CSS files come with a different name on every build with Webpack.
Add Comment