We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Jun 27, 2018 2:18 PM
Hello! I'm experiencing really annoying isssues with cached css.
I'm making some changes to my template's css and i need to check withoout having to wait up to 2 hours... 😕 Is there a way o regenerate or even delete CDN css files generated by Hubspot.
Solved! Go to Solution.
Jul 2, 2018 9:03 AM
I found a dumb and inefficient solution to this problem:
-I changed the name of the CSS file in my server.
-Changed the name in the import sentence.
-Reload the page.
For me that does not make any sense (it is supposed to do the same with the randon parameter added to the URL). But for some reason Hubspot is omiting this aproach.
If someone else knows another better solution, please let me know, i will appreciate it.
Jul 2, 2018 9:03 AM
I found a dumb and inefficient solution to this problem:
-I changed the name of the CSS file in my server.
-Changed the name in the import sentence.
-Reload the page.
For me that does not make any sense (it is supposed to do the same with the randon parameter added to the URL). But for some reason Hubspot is omiting this aproach.
If someone else knows another better solution, please let me know, i will appreciate it.
Jun 28, 2018 5:58 AM
I have this same issue.
first, this seams to only be an issue when you are working on live pages, staged pages, etc. you should try working off of a template preview.
if that doesn't work or isn't possible for you then the trick I use, and it works for me, is to add a query to the url. I add ?no-cache=true to the end of the page url. if the url already has queries then you can add onto the query with & instead of ?.
"no-cache=true" doesn't mean anything as far as I know, and could really say anything you want, that's just what I use. you have to add to the value on each reload. I just type random letters so, for instance, it could end up looking like no-cache=truedfadfadgaag. I don't know why it refreshes the cache but in my experience it does.
Jun 28, 2018 8:52 AM
@Jsum Sounds like a good opportunity for an eager developer to make a chrome extension 😄
Jun 27, 2018 2:56 PM
Does this post help you? If so, then help others by accepting it as a solution.
Q: How can i delete generated CSS from CDN?
Short A: Don't think this is possible, but ...
Longer A:
I remember reading something @Jsum wrote on an unrelated thread last month that is consistent with what @tjoyce recomends above ...
- see "add a query and value to your url..."
Please report your success back here.
Does that help solve your question?
Best,
Frank
Please add @MFJLabs to your message if you'd like me to reply.
Note: Please search for recent posts as HubSpot evolves to be the #1 CRM platform of choice world-wide.
Hope that helps.
Be well,
Frank
Jun 27, 2018 2:39 PM
Are you sure it's the CDN doing the caching? Seems more likely that the iframe that is distributing the preview window might be the one that's caching. Try doing a hard refresh with Shift+Refresh. A little more technical way to test would be to either, make a change to the css and hit publish, then open an incognito window and preview there. You could also use chrome tools to inspect the iframe and add a unique string parameter at the end of the URL iframe src... something like: "&randomString" at the end of the src url for the iframe.
Jun 27, 2018 2:47 PM
Hello! I already did the Incognito and Shift + F5 workaround. Im sure it is not my browser.
I'm already importing my css with a parameter
Ex:
@import url('http:/.../Core/core-draft.css?random=@Environment.TickCount');
The problem is with the CSS generated by Hubspot that is retreiving an old version of combined CSS. Is there a way to purge it and regenerate it again?