Copied to clipboard

Flag this post as spam?

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


  • Mario 151 posts 861 karma points MVP 2x c-trib
    1 week ago
    Mario
    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 1718 posts 11411 karma points MVP 7x c-trib
    1 week ago
    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 151 posts 861 karma points MVP 2x c-trib
    1 week ago
    Mario
    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 151 posts 861 karma points MVP 2x c-trib
    1 week ago
    Mario
    0

    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/

Please Sign in or register to post replies

Write your reply to:

Draft