Reload doesn't actually reload JavaScript and CSS



  • Being a dev, I test my websites/scripts all the time. I noticed that when CSS or JS files get updated, clicking Reload button doesn't help. Yes, it reloads page, but old CSS/JS content seems to be forcefully cached, so updating CSS/JS files and viewing changes is almost impossible with Vivaldi.

    Yes, I realize some servers add custom rules to cache CSS/JS resources for some time, but because I manage all these servers myself, I know no such rules exist. The only way to use Vivaldi for viewing changes is to use Tools/Clear Private Data and cleanup cache/local storage/etc and then reload page again (or use Firefox or IE, both of these actually reload not only HTML content, but also CSS/JS after clicking Reload)



  • @toxpal "Crtl+R" nor "Ctrl+Shift+R" does work?



  • Will try that.

    By the way, this forced caching only occurs when external CSS/JS files are used (but 99.99% developers include external files by default). If JS/CSS code is inserted right into HTML file itself, everything gets reloaded properly.



  • Btw you can skip on the "Crtl+R" shortcut
    it is "Crtl+F5" or "Ctrl+Shift+R" (they do the same thing so you can choose what suits you best)

    Found them via the keyboard cheat-sheet "Ctrl+F1"



  • CTRL+F5 seems to work so far...


  • Moderator

    @toxpal I can't believe that a web dev doesn't know about both of the two reload methods that have been there in all major browsers for years. 😲

    So, basically - please remember this, as it's one of the crucial things in web development - standard reload ([CTRL]+[R] - default shortcut in Windows) refreshes only the page that you're viewing, meaning that it usually updates only the HTML, whereas the force reload ([CTRL]+[F5] or [CTRL]+[SHIFT]+[R] - two common default shortcuts in Windows) refreshes the page and all of its contents - images, scripts, and styles. It comes in very handy especially when you're updating your web pages.



  • Well, I never ever had to use "extended" reload because old Opera and current versions of FF and IE never caused any troubles with reloads.


  • Moderator

    @toxpal Perhaps it depends on the web server configuration. I've used many of them since the IE6 era and I often had to force reload pages to see changes in various browsers, including the old Opera, Firefox, Safari or Chrome.



  • @pafflick said:

    I can't believe that a web dev doesn't know about both of the two reload methods that have been there in all major browsers for years. 😲

    We've all been there (the beginning).

    Perhaps it depends on the web server configuration. I've used many of them since the IE6 era and I often had to force reload pages to see changes in various browsers, including the old Opera, Firefox, Safari or Chrome.

    It's also possible to get Apache default-configured so that even forcing reload doesn't help and then pull your hairs until you figure out the correct cache settings. :sweat_smile:



  • Yes, I know it's possible to get Apache configured many different ways, that's why I posted an explanation that it's not configured this way.



  • @pafflick Neither Ctrl+F5 nor Ctrl+Shift+R work for me. In the old Opera it was possible to set the browser to always reload everything - that's what made it so good for development work.


  • Moderator

    @nickji Then go to Vivaldi Settings > Keyboard (vivaldi://settings/keyboard/), expand the "Page" category and check the keyboard shortcuts for "Force Page Reload". You could also check it via the Keyboard Cheat Sheet (by default it's [CTRL]+[F1]), but you can alter them only on the settings page.


  • Moderator

    Reload works!
    You can check how F5 and Ctrl+F5 reload works.

    • Open a webpage
    • Open Developertools with Ctrl+Shift+I
    • Select Network tab
    • Hit F5
    • Hit F5
    • See that content is fetched from cache until cache entry expires for that content or got a Status 304 stating that content did not change
    • Hit Ctrl+F5
    • See that fresh content is fetched Internet with Status 200

Log in to reply
 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.