Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mario Lopez 168 posts 958 karma points MVP 4x c-trib
    Jul 31, 2022 @ 23:06
    Mario Lopez
    0

    what's appending version numbers to JS?

    On Umbraco 10, I can't debug JS scripts because they are being appended a version number, and I can't find what's doing that.

    version numbers

    I have tried setting the debug mode as true but same thing.

    Umbraco settings

    Any ideas?

  • Marc Goodson 2157 posts 14434 karma points MVP 9x c-trib
    Aug 01, 2022 @ 22:31
    Marc Goodson
    0

    Hi Mario

    I think Smidge is responsible for bundling these scripts, and I think in order to stop it combining and minifying assets, you set a true/false value for debug mode when you use the Smidge Helpers - I think this is wired up in the SmidgeRuntimeMinifier:

    https://github.com/umbraco/Umbraco-CMS/blob/v10/dev/src/Umbraco.Web.Common/RuntimeMinification/SmidgeRuntimeMinifier.cs#L138

    Which seems to be reading from Umbraco Cms Hosting Debug

    But in this PR for V9 where smidge was introduced it says:

    https://github.com/umbraco/Umbraco-CMS/pull/10503

    "This means that the files will be delivered as-is without being processed but will contain the cache buster value."

    So I think they are the raw files, just with the cachebuster querystring appended.

    I don't know if that helps!

    regards

    marc

  • Mario Lopez 168 posts 958 karma points MVP 4x c-trib
    Aug 02, 2022 @ 04:57
    Mario Lopez
    0

    Thanks Marc,

    I tried running the site with debug as true but the cache buster is still there. I think that's what makes DevTools to remove all the breakpoint on refresh.

    For what I read on the link you shared, this is by design. Maybe I'm doing something wrong?? Maybe there's a way to tell DevTools to don't remove the breakpoints on refresh?

  • Mario Lopez 168 posts 958 karma points MVP 4x c-trib
    Aug 02, 2022 @ 05:10
    Mario Lopez
    100

    I found the issue. I had on my appsettings.Development.json the cache buster configured as Timestamp.

    By default this value is Version which uses a Version value on the config file.

    If the value is not present, it generates a random value based on the site version and some other things.

    Docs here: https://our.umbraco.com/documentation/reference/configuration/RuntimeMinificationSettings/

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies