DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

versioning as parameter on images

Sort:
You are not authorized to post a reply.





Advanced Member





    Hello, I have build a new site but on each image I get something like  '/Grand_Combin_N.jpg?ver=gQW_EBljfV5hnrKFFcMNyQ%3d%3d'. How do I turn this off?

    Mariette Knap
    Microsoft MVP Alumni





    Growing Member





      I'm not sure that you can turn it of - there may be a web config setting.

      I suggest that you don't. The purpose of this is to allow long duration image caching at the browser improving performance, and reducing load on your server and infrastructure. Instead add the web config entries needed for the long duration cache headers and see your web site speed up.

      https://www.dynamisys.co....Side-caching--Part-1
      Thanks,
      Richard
      www.dynamisys.co.uk





      Advanced Member





        Richard, I know how to cache and I also know it does not depend on 'versioning as parameter'. I will do a compare with other sites that do not have this behavior
        Mariette Knap
        Microsoft MVP Alumni





        Advanced Member





          The setting 'AddCachebusterToResourceUris' was missing from dbo.PortalSettings. Adding this and setting it to false changed the behavior.

          INSERT INTO [dbo].[PortalSettings] ([PortalID], [SettingName], [SettingValue], [CreatedByUserID], [CreatedOnDate], [LastModifiedByUserID], [LastModifiedOnDate], [IsSecure])
          VALUES (0, 'AddCachebusterToResourceUris','false', -1, GETDATE(), -1, GETDATE(), 0);
          Mariette Knap
          Microsoft MVP Alumni





          Growing Member





            Hi Mariette,

            Sorry if I was teaching you kids stuff.

            May I ask why you want to remove it? ISTM that it's crucial for allowing cache busting to work properly.
            Thanks,
            Richard
            www.dynamisys.co.uk





            Advanced Member





              Security reasons
              Mariette Knap
              Microsoft MVP Alumni





              Growing Member





                Fair enough.

                I'm curious because I don't know what any security exposure could be, but I guess security reasons always trumps everything else.
                Thanks,
                Richard
                www.dynamisys.co.uk





                Veteran Member





                  Posted By Mariette Knap on 2/27/2023 1:41 AM
                  The setting 'AddCachebusterToResourceUris' was missing from dbo.PortalSettings. Adding this and setting it to false changed the behavior.

                  INSERT INTO [dbo].[PortalSettings] ([PortalID], [SettingName], [SettingValue], [CreatedByUserID], [CreatedOnDate], [LastModifiedByUserID], [LastModifiedOnDate], [IsSecure])
                  VALUES (0, 'AddCachebusterToResourceUris','false', -1, GETDATE(), -1, GETDATE(), 0);

                  Whoa... I didn't realize how far back this setting goes.  :)  

                  https://github.com/dnnsof...Platform/issues/2850

                   

                   






                  Advanced Member





                    It seems it is default behavior in a new 9.11.1 install to not add that setting to PortalSettings. I tried adding it also to HostSettings assuming it would act global but that did not work, so each new portal needs this added.
                    Mariette Knap
                    Microsoft MVP Alumni





                    Veteran Member





                      Posted By Mariette Knap on 2/27/2023 12:02 PM
                      It seems it is default behavior in a new 9.11.1 install to not add that setting to PortalSettings. I tried adding it also to HostSettings assuming it would act global but that did not work, so each new portal needs this added.

                      A global setting might be a good idea to start an issue/discussion to get added.  🤔 

                       

                      You are not authorized to post a reply.

                      These Forums are dedicated to the discussion of DNN Platform.

                      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      5. No Flaming or Trolling.
                      6. No Profanity, Racism, or Prejudice.
                      7. Site Moderators have the final word on approving / removing a thread or post or comment.
                      8. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved