AxWebBrowser - problem with caching website.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vjay77

    AxWebBrowser - problem with caching website.

    I have a timer which triggers AxWebBrowser1 every 5 minutes to visit
    one of my websites.

    What I find out later in my websites logs, was, that it really visited
    my website only for the first time.

    Second time it went to the site and every other time, it was reloaded
    probably from the cache, hdd or from somewhere... I am just guessing.


    This is something I couldn't resolve and its killing me as I am
    spending too much time with this little thing.

    I tried to use refresh and update as you see... but these wouldn't
    work.
    I even tried to go to blank page first and then to my website...still
    caching ...

    If I restart the whole application it again works for a first time it
    visits the page... drives me mad :)


    This is my code:

    Private Sub Timer1_Tick(ByV al sender As Object,
    ByVal e As System.EventArg s) Handles Timer1.Tick

    Label1.Text = DateTime.Now
    AxWebBrowser1.N avigate(TextBox 1.Text)
    AxWebBrowser1.R efresh()
    AxWebBrowser1.U pdate()

    End Sub

    Every help much appreciated.

    Vjay



    ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
  • Cor

    #2
    Re: AxWebBrowser - problem with caching website.

    Hi Vjay,

    I am not sure, I thought I had the same problems, but you can try the

    axwebbrowser.re fresh2(3)

    method, that should do it, but I am in doubt.

    Tell me if it works, will you?

    Cor
    [color=blue]
    > What I find out later in my websites logs, was, that it really visited
    > my website only for the first time.
    >
    > Second time it went to the site and every other time, it was reloaded
    > probably from the cache, hdd or from somewhere... I am just guessing.
    >
    >
    > This is something I couldn't resolve and its killing me as I am
    > spending too much time with this little thing.
    >
    > I tried to use refresh and update as you see... but these wouldn't
    > work.
    > I even tried to go to blank page first and then to my website...still
    > caching ...
    >
    > If I restart the whole application it again works for a first time it
    > visits the page... drives me mad :)
    >[/color]


    Comment

    • Tony

      #3
      AxWebBrowser - problem with caching website.

      I don't know how to do what you want to do.
      I just wonder if Microsoft have designed their products
      to avoid programmers being able to do that easily because
      it might allow an ill intentioned programmer to overload
      any server he wanted to, just put a very short timer and
      set up a few clients to load pages from the server every
      few milliseconds. I am not suggesting you have any
      intention of wanting to do that, just that it might be
      why it is difficult to find a technical solution to do it.
      In fact I don't have an answer to your question, I am
      just curious to know if it is possible to do it.
      Best Regards, Tony[color=blue]
      >-----Original Message-----
      >I have a timer which triggers AxWebBrowser1 every 5[/color]
      minutes to visit[color=blue]
      >one of my websites.
      >
      >What I find out later in my websites logs, was, that it[/color]
      really visited[color=blue]
      >my website only for the first time.
      >
      >Second time it went to the site and every other time, it[/color]
      was reloaded[color=blue]
      >probably from the cache, hdd or from somewhere... I am[/color]
      just guessing.[color=blue]
      >
      >
      >This is something I couldn't resolve and its killing me[/color]
      as I am[color=blue]
      >spending too much time with this little thing.
      >
      >I tried to use refresh and update as you see... but[/color]
      these wouldn't[color=blue]
      >work.
      >I even tried to go to blank page first and then to my[/color]
      website...still[color=blue]
      >caching ...
      >
      >If I restart the whole application it again works for a[/color]
      first time it[color=blue]
      >visits the page... drives me mad :)
      >
      >
      >This is my code:
      >
      >Private Sub Timer1_Tick(ByV al sender As Object,
      >ByVal e As System.EventArg s) Handles Timer1.Tick
      >
      > Label1.Text = DateTime.Now
      > AxWebBrowser1.N avigate(TextBox 1.Text)
      > AxWebBrowser1.R efresh()
      > AxWebBrowser1.U pdate()
      >
      > End Sub
      >
      >Every help much appreciated.
      >
      >Vjay
      >
      >
      >
      >----== Posted via Newsfeed.Com - Unlimited-Uncensored-[/color]
      Secure Usenet News==----[color=blue]
      >http://www.newsfeed.com The #1 Newsgroup Service in the[/color]
      World! >100,000 Newsgroups[color=blue]
      >---= 19 East/West-Coast Specialized Servers - Total[/color]
      Privacy via Encryption =---[color=blue]
      >.
      >[/color]

      Comment

      • Vjay77

        #4
        re:AxWebBrowser - problem with caching website.

        Daer Cor,
        refresh2 doesn't work either?

        Tony:
        you might be right, but it wouldn't let me update them even in 5
        minutes intervals. Sux badly.

        Any other ideas?

        Thanks for trying to help.

        vjay



        ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
        http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
        ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

        Comment

        • Dan M

          #5
          Re: AxWebBrowser - problem with caching website.

          you might try changing a setting in Internet Explorer - Tools/Internet
          Options - then under Settings button - Check for newer versions of stored
          pages - select "Every visit to the page". I believe this is stored in
          registry @ Current User\Software\M icrosoft\Window s\CurrentVersio n\Internet
          Settings\SyncMo de5 so that you can check value (and change) in program if
          needed. (key doesn't look it exists until you first change the value in
          Internet Explorer)


          "Vjay77" <vjay77dkjk@hot mail-dot-com.no-spam.invalid> wrote in message
          news:3fe7c885$1 _2@127.0.0.1...[color=blue]
          > I have a timer which triggers AxWebBrowser1 every 5 minutes to visit
          > one of my websites.
          >
          > What I find out later in my websites logs, was, that it really visited
          > my website only for the first time.
          >
          > Second time it went to the site and every other time, it was reloaded
          > probably from the cache, hdd or from somewhere... I am just guessing.
          >
          >
          > This is something I couldn't resolve and its killing me as I am
          > spending too much time with this little thing.
          >
          > I tried to use refresh and update as you see... but these wouldn't
          > work.
          > I even tried to go to blank page first and then to my website...still
          > caching ...
          >
          > If I restart the whole application it again works for a first time it
          > visits the page... drives me mad :)
          >
          >
          > This is my code:
          >
          > Private Sub Timer1_Tick(ByV al sender As Object,
          > ByVal e As System.EventArg s) Handles Timer1.Tick
          >
          > Label1.Text = DateTime.Now
          > AxWebBrowser1.N avigate(TextBox 1.Text)
          > AxWebBrowser1.R efresh()
          > AxWebBrowser1.U pdate()
          >
          > End Sub
          >
          > Every help much appreciated.
          >
          > Vjay
          >
          >
          >
          > ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet[/color]
          News==----[color=blue]
          > http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000[/color]
          Newsgroups[color=blue]
          > ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption[/color]
          =---


          Comment

          • Martin Ho

            #6
            re:AxWebBrowser - problem with caching website.

            These are exactly the same problems as I have experienced with vb.net
            while trying to use smtp authorization.. .
            simply wouldn't work

            I hope someone will help you.

            Martin



            ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
            http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
            ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

            Comment

            • Vjay77

              #7
              re:AxWebBrowser - problem with caching website.

              Dan,

              I tried what you suggested but Current
              User\Software\M icrosoft\Window s\CurrentVersio n\Internet
              Settings\SyncMo de5 doesn't exist in win xp home registries, or I am
              blind but really can't find it.
              I was able to get only to Current
              User\Software\M icrosoft\Window s\CurrentVersio n\Internet
              Settings\ but 'SyncMode5' is not there.

              Then, I have changed settings in internet explorer as per what you
              said, and it finally fixed the problem. Now I would need to figure
              out how to do this programmaticall y, is there any other way to do
              this? or any other path in registries?

              Thanks for all you help.
              Vjay



              ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
              http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
              ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

              Comment

              • Dan M

                #8
                Re: re:AxWebBrowser - problem with caching website.


                double-check to see if the registry key is there now - I just checked a Win
                XP home machine - it didn't exist initially but once I changed the setting
                in IE - it appears in the registry.

                I am running this on an internal system that I have control over- if I
                needed to distribute this to a client I might be worry about counting on
                that registry key always existing (and working) with every upgrade to
                windows - maybe someone else can chime in on using this...

                anyway this is what I use to check in code - you can change GetValue to
                SetValue to actually change the key.

                Imports Microsoft.Win32

                Dim regKey As RegistryKey
                Dim dResult As Int16
                regKey =
                Registry.Curren tUser.OpenSubKe y("Software\Mic rosoft\Windows\ CurrentVersion\ I
                nternet Settings", True)
                dResult = Convert.ToInt16 (regKey.GetValu e("SyncMode5" , 0))
                If dResult <> 3 Then
                MessageBox.Show ("Browser not configured properly")
                End If
                regKey.Close()

                "Vjay77" <vjay77dkjk@hot mail-dot-com.no-spam.invalid> wrote in message
                news:3fe86382$1 _2@127.0.0.1...[color=blue]
                > Dan,
                >
                > I tried what you suggested but Current
                > User\Software\M icrosoft\Window s\CurrentVersio n\Internet
                > Settings\SyncMo de5 doesn't exist in win xp home registries, or I am
                > blind but really can't find it.
                > I was able to get only to Current
                > User\Software\M icrosoft\Window s\CurrentVersio n\Internet
                > Settings\ but 'SyncMode5' is not there.
                >
                > Then, I have changed settings in internet explorer as per what you
                > said, and it finally fixed the problem. Now I would need to figure
                > out how to do this programmaticall y, is there any other way to do
                > this? or any other path in registries?
                >
                > Thanks for all you help.
                > Vjay
                >
                >
                >
                > ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet[/color]
                News==----[color=blue]
                > http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000[/color]
                Newsgroups[color=blue]
                > ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption[/color]
                =---


                Comment

                • Vjay77

                  #9
                  re:AxWebBrowser - problem with caching website.

                  Thanks Dan.
                  This is really good to know.
                  Thanks for your time.

                  I hope someone will find out how to refresh the axwebbrowser properly,
                  so I don't have to go through these troubles with setting registries
                  and checking if they exist or not... that is not the best...

                  there must be some programmatic way of doing it using axwebbrowser
                  properties...

                  hm..

                  Hope someone can find this challanging...

                  vjay



                  ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
                  http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
                  ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

                  Comment

                  • Cor

                    #10
                    Re: re:AxWebBrowser - problem with caching website.

                    Hi Vjay,
                    [color=blue]
                    > there must be some programmatic way of doing it using axwebbrowser
                    > properties...[/color]
                    [color=blue]
                    > Hope someone can find this challanging...[/color]

                    I did already, but the webbrowser is just using IE.
                    I thought that in the next version of VB.net there will be a seperated
                    webbrowser.

                    But I was hoping I was wrong and you did find the way

                    I did not do what Dan was advising, for two reasons

                    Because of that this Microsoft can change it everyday if they think it is a
                    security problem, without have to think on other developers.
                    Because the user does not know what you are doing in his settings and that
                    can give problems (When it is an "in house" program that is a less problem I
                    asume)

                    :-))

                    Cor



                    Comment

                    • Vjay77

                      #11
                      re:AxWebBrowser - problem with caching website.

                      Cor,
                      this application will be eventually used just for my own purposes as
                      it looks right now.
                      So I assume this is the end to this debate?
                      No one else has anything else to add?

                      vjay



                      ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
                      http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
                      ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

                      Comment

                      • scorpion53061

                        #12
                        Re: re:AxWebBrowser - problem with caching website.

                        Vjay,

                        I assume you have tried:
                        WebBrowser1.Nav igate2 http://www.yahoo.com navNoReadFromCa che

                        not sure on the syntax as I dont have a book by me.

                        "Vjay77" <vjay77dkjk@hot mail-dot-com.no-spam.invalid> wrote in message
                        news:3fe89021_2 @127.0.0.1...[color=blue]
                        > Cor,
                        > this application will be eventually used just for my own purposes as
                        > it looks right now.
                        > So I assume this is the end to this debate?
                        > No one else has anything else to add?
                        >
                        > vjay
                        >
                        >
                        >
                        > ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet[/color]
                        News==----[color=blue]
                        > http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000[/color]
                        Newsgroups[color=blue]
                        > ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption[/color]
                        =---


                        Comment

                        • scorpion53061

                          #13
                          Re: AxWebBrowser - problem with caching website.

                          A Refresh2 method accepts an argument that determines the refresh level.
                          This refresh level argument can have one of the following values:

                          REFRESH_NORMAL 0
                          REFRESH_IFEXPIR ED 1
                          REFRESH_COMPLET ELY 3

                          Thus

                          Dim REFRESH_COMPLET ELY As Object = 3
                          axWebBrowser1.R efresh2( REFRESH_COMPLET ELY)

                          Let me know if this helped.

                          "Vjay77" <vjay77dkjk@hot mail-dot-com.no-spam.invalid> wrote in message
                          news:3fe7c885$1 _2@127.0.0.1...[color=blue]
                          > I have a timer which triggers AxWebBrowser1 every 5 minutes to visit
                          > one of my websites.
                          >
                          > What I find out later in my websites logs, was, that it really visited
                          > my website only for the first time.
                          >
                          > Second time it went to the site and every other time, it was reloaded
                          > probably from the cache, hdd or from somewhere... I am just guessing.
                          >
                          >
                          > This is something I couldn't resolve and its killing me as I am
                          > spending too much time with this little thing.
                          >
                          > I tried to use refresh and update as you see... but these wouldn't
                          > work.
                          > I even tried to go to blank page first and then to my website...still
                          > caching ...
                          >
                          > If I restart the whole application it again works for a first time it
                          > visits the page... drives me mad :)
                          >
                          >
                          > This is my code:
                          >
                          > Private Sub Timer1_Tick(ByV al sender As Object,
                          > ByVal e As System.EventArg s) Handles Timer1.Tick
                          >
                          > Label1.Text = DateTime.Now
                          > AxWebBrowser1.N avigate(TextBox 1.Text)
                          > AxWebBrowser1.R efresh()
                          > AxWebBrowser1.U pdate()
                          >
                          > End Sub
                          >
                          > Every help much appreciated.
                          >
                          > Vjay
                          >
                          >
                          >
                          > ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet[/color]
                          News==----[color=blue]
                          > http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000[/color]
                          Newsgroups[color=blue]
                          > ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption[/color]
                          =---


                          Comment

                          • Vjay77

                            #14
                            re:AxWebBrowser - problem with caching website.

                            Ok I wrote it like you suggested


                            Dim REFRESH_COMPLET ELY As Object = 3
                            AxWebBrowser1.R efresh2(REFRESH _COMPLETELY)


                            It gave me unspecified error it simply crashed.

                            Then I tried to load the page first and than refresh it, like this:

                            [code:1:51d5a1a4 18]
                            AxWebBrowser1.N avigate(TextBox 1.Text)
                            Dim REFRESH_COMPLET ELY As Object = 3
                            AxWebBrowser1.R efresh2(REFRESH _COMPLETELY)
                            [/code:1:51d5a1a4 18]


                            But it still crashed on me. Refresh2 is probably not the best idea...


                            Then I tried:

                            [code:1:51d5a1a4 18]
                            AxWebBrowser1.F ocus()
                            SendKeys.Send(" F5")
                            [/code:1:51d5a1a4 18]

                            Nothing works.
                            Drives me mad :(

                            Vjay



                            ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
                            http://www.newsfeed.co m The #1 Newsgroup Service in the World! >100,000 Newsgroups
                            ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

                            Comment

                            • scorpion53061

                              #15
                              Re: re:AxWebBrowser - problem with caching website.

                              Try Navigate2

                              sorry it didnt work out for you this time.

                              "Vjay77" <vjay77dkjk@hot mail-dot-com.no-spam.invalid> wrote in message
                              news:3fe8f46b$1 _2@127.0.0.1...[color=blue]
                              > Ok I wrote it like you suggested
                              >
                              >
                              > Dim REFRESH_COMPLET ELY As Object = 3
                              > AxWebBrowser1.R efresh2(REFRESH _COMPLETELY)
                              >
                              >
                              > It gave me unspecified error it simply crashed.
                              >
                              > Then I tried to load the page first and than refresh it, like this:
                              >
                              > [code:1:51d5a1a4 18]
                              > AxWebBrowser1.N avigate(TextBox 1.Text)
                              > Dim REFRESH_COMPLET ELY As Object = 3
                              > AxWebBrowser1.R efresh2(REFRESH _COMPLETELY)
                              > [/code:1:51d5a1a4 18]
                              >
                              >
                              > But it still crashed on me. Refresh2 is probably not the best idea...
                              >
                              >
                              > Then I tried:
                              >
                              > [code:1:51d5a1a4 18]
                              > AxWebBrowser1.F ocus()
                              > SendKeys.Send(" F5")
                              > [/code:1:51d5a1a4 18]
                              >
                              > Nothing works.
                              > Drives me mad :(
                              >
                              > Vjay
                              >
                              >
                              >
                              > ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet[/color]
                              News==----[color=blue]
                              > http://www.newsfeed.co m The #1 Newsgroup Service in the World! >100,000[/color]
                              Newsgroups[color=blue]
                              > ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption[/color]
                              =---


                              Comment

                              Working...