How does asp.net generate a scriptResource.axd url?

I am trying to ensure that obsolete images / js / css files in the cache will not be used after deploying a new version of asp.net web application.

I am currently considering the js aspect of this. First, ALL of my own scripts are registered through System.Web.UI.ScriptManager with the usual URLs in js files. So, I have subclassed the ScriptManager, and at the end of the script url do I use? Ver = 'xxxx'. I don't see any problems with my scripts with regular URLs, however there are always many ScriptResource.axd links, and I am concerned about these scripts.

So, for example, let's say in my next version I am updating the AjaxControlToolkit dll. Will the scriptResource.axd URLs be different from the URLs used by the previous AjaxControlToolkit? ScriptResources.axd looks pretty funny to me, so I hope they are created with an assembly hash or something else? I went through a ton of literature on scriptResource.axd, but I did not find anything on this topic. Does anyone have any ideas?

Thanks for reading.

+3
source share
1 answer

You are partially right. Resource URL format WebResource.axd?d=encrypted identifier&t=time stamp value. "D" means the requested web resource. A “T” is a timestamp for the requested assembly, which can help determine if there have been any changes to the resource.

, assemblyName + "|" + resourceName ( Page.EncryptString); - , ( File.GetLastWriteTime).

, URL- ( / ).

:

+10

Source: https://habr.com/ru/post/1743416/


All Articles