Having problem getting DASP to use my Javascript code.

Discussion in 'HTML / PHP / JavaScript / CSS' started by albanello, May 18, 2014.

  1. This has happened twice! After publishing my Web application I log into my site as a customer and the Web application does NOT use the newly published Javascript code. There seams to be a long delay before the Application start using the newly published Javascript.
    I have tried Stop/Start the application and Recycle the application Pool neither made a difference. The newly published Javascript will start working after some hours have passed........have not established the exact time but it seams to be more than a few minutes.
    ********
    The Javascript code is in:
    /Javascript/StopWatch.js
    I register it in this manner:
    Dim csm As ClientScriptManager = Page.ClientScript
    Dim csmtype As Type = Me.GetType()
    Dim csmname As String = "csmStopWatch"
    Dim csmurl As String = "/JavaScript/StopWatch.js"
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    '********
    'Register a Javascript file
    'Define the name, type and url of the client script on the page.
    '********
    ' Check to see if the include script is already registered.
    If (Not csm.IsClientScriptIncludeRegistered(csmtype, csmname)) Then
    'Not registered
    'Register script
    csm.RegisterClientScriptInclude(csmtype, csmname, ResolveClientUrl(csmurl))
    End If

    Other stuff unrelatedOther stuff unrelatedOther stuff unrelatedOther stuff unrelated

    End Sub
    ********
    Do I have to unregister it? What do I need to do to get the server to use the newer version right after I publishing it, so I can verify everything is working at DASP?
    Thanks
    Albanello
     
  2. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    Try clearing your browser's cache.
     

Share This Page