简体   繁体   中英

ASP.NET Javascript cache busting

I'm trying to do this:

<script type="text/javascript" src="js/pages/cca.js?rev=<%= DateTime.Now.Ticks %>"></script>

Page won't load, I get:

Exception thrown: 'System.Threading.ThreadAbortException' in mscorlib.dll

And the site will say:

localhost redirected you too many times. ERR_TOO_MANY_REDIRECTS

I'm not that familiar with asp.net, can someone point me to my mistake?

EDIT:

Stacktrace: 在此处输入图片说明

I had to wrap it in a rad code block, I'm not sure why but Telerick is the reason:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript" src="js/pages/cca.js?rev=<%= DateTime.Now.Ticks %>"></script>
</telerik:RadCodeBlock>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM