Force browser to load newest CSS and Interactions on exported site

Hi!

I’m hosting a website I’ve exported from Webflow on Godaddy server and facing a problem each time I am updating styles on any page.

How do I force browser to get the latest version?

I’ve manually added CSS versioning code to one of the pages I was editing. Like that my CSS got updated, but all the new Interactions/Animations I’ve created are not updated. How do I force load Interactions and is there any better method for both CSS and Interactions. Thanks

<link href="css/normalize.css?version=3" rel="stylesheet" type="text/css">
<link href="css/webflow.css?version=3" rel="stylesheet" type="text/css">
<link href="css/gilbert.webflow.css?version=3" rel="stylesheet" type="text/css">

OK, tweaking this code seems to be of help . Hopefully I am not creating issues with this?

<script src="https://code.jquery.com/jquery-3.3.1.min.js?version=3" type="text/javascript" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script src="js/webflow.js?version=3" type="text/javascript"></script>

Webflow hosting automatically does cache busting stuff so you’ll always have the latest version. If you’re hosting elsewhere you can just append a new version number at the end of the external files.

e.g.:

js/webflow.js
js/webflow.js?v=1
js/webflow.js?v=2
js/webflow.js?v=3
...
1 Like

If your needing the newest versions for dev purposes then why not just use dev tools in your browser? Options include not caching content for example.

1 Like

I think radmitry’s concern here is that his clients/visitors will not see the latest version of the site?

Yes, thats exactly the case. So adding version number to stylesheets and js scripts helps. Just wonder if it has any downsides apart from manually tweaking html?

Thanks :slight_smile:

Nope

1 Like

@samilew is correct. As a dev, using a date time stamp as the version number can help. Especially when working with a team. Just a thing to consider.

1 Like

Nice tip. Thanks :slight_smile:

does 2021 Webflow exports need to be continually updated once exported to another server? (such as dreamhost/GoDaddy ?)

Yes , upon each new export you need to add a css and js versioning . A simpler way could be using Udesly to convert your theme to a Wordpress theme

will my cloned animations (such as custom sliders, button reactions, etc) continue to function when exported/converted to a wordpress theme?

Not quite sure what you mean by cloned animations, but it’s a pretty good chance it will. I have created websites with added custom code and converted to WP. Here are a few websites created in Webflow and converted to Wordpress, the only thing I added in WP is a cookie consent plugin https://jdpamazon.com/
https://seeing-knowing.com/

But be aware that you will not be able to transfer your CMS content to WP like this. You will have to create a template, like a blog page template and then add your content in WP. Though it’s pretty easy to do. If you have multiple CMS pages, that can be an additional challenge, I haven’t tried that yet.