{"action":"created","issue":{"url":"https://api.github.com/repos/dnnsoftware/Dnn.Platform/issues/300","labels_url":"https://api.github.com/repos/dnnsoftware/Dnn.Platform/issues/300/labels{/name}","comments_url":"https://api.github.com/repos/dnnsoftware/Dnn.Platform/issues/300/comments","events_url":"https://api.github.com/repos/dnnsoftware/Dnn.Platform/issues/300/events","html_url":"https://github.com/dnnsoftware/Dnn.Platform/pull/300","id":57433565,"number":300,"title":"DNN-6562 Browsercaching","user":{"login":"RichardHowells","id":6627531,"avatar_url":"https://avatars.githubusercontent.com/u/6627531?v=3","gravatar_id":"","url":"https://api.github.com/users/RichardHowells","html_url":"https://github.com/RichardHowells","followers_url":"https://api.github.com/users/RichardHowells/followers","following_url":"https://api.github.com/users/RichardHowells/following{/other_user}","gists_url":"https://api.github.com/users/RichardHowells/gists{/gist_id}","starred_url":"https://api.github.com/users/RichardHowells/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichardHowells/subscriptions","organizations_url":"https://api.github.com/users/RichardHowells/orgs","repos_url":"https://api.github.com/users/RichardHowells/repos","events_url":"https://api.github.com/users/RichardHowells/events{/privacy}","received_events_url":"https://api.github.com/users/RichardHowells/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/dnnsoftware/Dnn.Platform/milestones/11","labels_url":"https://api.github.com/repos/dnnsoftware/Dnn.Platform/milestones/11/labels","id":922938,"number":11,"title":"7.4.1","description":"","creator":{"login":"jbrinkman","id":862921,"avatar_url":"https://avatars.githubusercontent.com/u/862921?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrinkman","html_url":"https://github.com/jbrinkman","followers_url":"https://api.github.com/users/jbrinkman/followers","following_url":"https://api.github.com/users/jbrinkman/following{/other_user}","gists_url":"https://api.github.com/users/jbrinkman/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrinkman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrinkman/subscriptions","organizations_url":"https://api.github.com/users/jbrinkman/orgs","repos_url":"https://api.github.com/users/jbrinkman/repos","events_url":"https://api.github.com/users/jbrinkman/events{/privacy}","received_events_url":"https://api.github.com/users/jbrinkman/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":11,"state":"open","created_at":"2015-01-05T22:59:36Z","updated_at":"2015-02-13T01:25:28Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-02-12T09:02:01Z","updated_at":"2015-02-14T20:20:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dnnsoftware/Dnn.Platform/pulls/300","html_url":"https://github.com/dnnsoftware/Dnn.Platform/pull/300","diff_url":"https://github.com/dnnsoftware/Dnn.Platform/pull/300.diff","patch_url":"https://github.com/dnnsoftware/Dnn.Platform/pull/300.patch"},"body":"DNN-6562 - Add cache buster to uris for images and other resources accessed from the browser via a FileUrl"},"comment":{"url":"https://api.github.com/repos/dnnsoftware/Dnn.Platform/issues/comments/74390333","html_url":"https://github.com/dnnsoftware/Dnn.Platform/pull/300#issuecomment-74390333","issue_url":"https://api.github.com/repos/dnnsoftware/Dnn.Platform/issues/300","id":74390333,"user":{"login":"janjonas","id":1097370,"avatar_url":"https://avatars.githubusercontent.com/u/1097370?v=3","gravatar_id":"","url":"https://api.github.com/users/janjonas","html_url":"https://github.com/janjonas","followers_url":"https://api.github.com/users/janjonas/followers","following_url":"https://api.github.com/users/janjonas/following{/other_user}","gists_url":"https://api.github.com/users/janjonas/gists{/gist_id}","starred_url":"https://api.github.com/users/janjonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janjonas/subscriptions","organizations_url":"https://api.github.com/users/janjonas/orgs","repos_url":"https://api.github.com/users/janjonas/repos","events_url":"https://api.github.com/users/janjonas/events{/privacy}","received_events_url":"https://api.github.com/users/janjonas/received_events","type":"User","site_admin":false},"created_at":"2015-02-14T20:20:00Z","updated_at":"2015-02-14T20:20:00Z","body":"@RichardHowells: Thanks for the detailed feedback. I understand all of your arguments.\r\n\r\nIMHO, your HTML module scenario shows the big problem: Even if the module is clever enough to update the image URLs if the file changes you have the same problem with external sources that refer to your resources (websites or maybe search engines) because they can't know that a resource (and it's URL) has been updated.\r\n\r\nI would suggest the following: Instead of (automatically) adding a version token to the URLs, DNN provides functionalities (for administrator) to define (client-side) cache times (for files and/or folders). At the moment in a default DNN 7.4.0 installation there is a default cache time of 365 days for static resources defined in the web.config:\r\n<clientCache cacheControlCustom=\"public\" cacheControlMode=\"UseMaxAge\" cacheControlMaxAge=\"365.00:00:00\" />\r\nDepending on the frequency a resource changes, cache times could be defined (for logos a cache time of 7 days could be reasonable). Of course, suggestion does not fix the problem that there is some delay before all clients get the new resources, but this feature will not introduce any other drawbacks. If a developer wants to make sure that clients always gets the most recent version, he could either use some custom logic or the abstract FolderProvider provides a new method GetFileUrl(IFileInfo file, bool disableCache) which is implemented by all file providers.\r\n\r\nBtw: Maybe a default caching of 365 day is a bit too long and one should decrease the default caching (for example to one day) and override the default value with a higher one for files/folders that most likely won't change. But this question should not be discussed in the pull request.\r\n"}}