would allowing google to serve up jQuery not also stop this problem?

On Oct 14, 1:13 am, Ninad Desai <desai.ni...@gmail.com> wrote:
> Hey Mike,
> Do you see timestamp / query string appended to js even when you see
> source code?
> if that is the case, make sure no rewrite rules are written
> in .htaccess, to avoid server side caching.
>
> Ninad
>
> On Oct 13, 3:21 pm, James <james.gp....@gmail.com> wrote:
>
> > I don't know ASP.NET MVC, but just make sure, you're sure that it's
> > not added by the MVC, right (thus, not visible in the page source)?
>
> > As mentioned, post a test page.
>
> > On Oct 13, 10:57 am, Michael Geary <m...@mg.to> wrote:
>
> > > Bob, there's something you're not telling us, and that something is in the
> > > test page you haven't posted. ;-)
>
> > > If I understand what you've described so far, it is truly impossible. So
> > > either I misunderstood you or you've left out a key detail.
>
> > > My understanding of what you've said is:
>
> > > * You're loading jQuery and jQuery UI with the <script> tags posted 
> > > earlier.
>
> > > * You're *not* loading an additional copy of jQuery or jQuery UI via an 
> > > Ajax
> > > call.
>
> > > * Sometimes, the GET requests for jQuery and jQuery UI have the ?_=nnnnnn
> > > cachebuster in the URL.
>
> > > That can't happen, unless there is a whole other side to this story.
>
> > > Let's look at the timeline:
>
> > > 1. Browser starts loading HTML page.
>
> > > 2. Browser parses <script> tag for jquery-xyz.js.
>
> > > 3. Browser issues a GET request for jquery.xyz.js.
>
> > > 4. Browser receives the content of jquery.xyz.js and closes the 
> > > connection.
>
> > > 5. Browser parses the code in jquery.xyz.js.
>
> > > 6. Browser runs jQuery's initialization code.
>
> > > Now, jQuery does contain the code you noted in $.ajax() that adds the
> > > cachebuster to Ajax URLs. But that code doesn't run *at all* during steps 
> > > 1
> > > through 6. It doesn't run until step 7:
>
> > > 7. You call $.ajax() or one of its convenience methods, and $.ajax adds 
> > > the
> > > cachebuster before doing its GET or POST.
>
> > > jQuery code running in step 7 can not reach back in time all the way to 
> > > step
> > > 3 and change the URL in the GET request that *loaded jQuery*. John may be
> > > smart, but he's no time traveler.
>
> > > So what's the secret you're hiding from everyone? Post that test page and 
> > > we
> > > can find out. :-)
>
> > > -Mike
>
> > > On Tue, Oct 13, 2009 at 11:22 AM, Bob Eastbrook 
> > > <baconeater...@gmail.com>wrote:
>
> > > > On Tue, Oct 13, 2009 at 11:14 AM, Bob <baconeater...@gmail.com> wrote:
>
> > > > > It's in the definition for the "ajax" function.  When I set { cache:
> > > > > false } in ajaxOptions, I get timestamps added to the end of my XHRs.
> > > > > That makes sense.  However, I still don't know why timestamps are
> > > > > added to jQuery & jQuery-UI.
>
> > > > Clarification: I still don't know why timestamps are added to the
> > > > jQuery & jQuery-UI source when ajaxOptions doesn't have the "cache"
> > > > option set.

Reply via email to