In addition to <link>, <frame>s are also not processed correctly if download
embedded resources is checked, or at least weren't as of 2.0.1.
Specifically, any src= attributes inside <frames> are ignored.

I was paid to fix a few things such as this and implement a few others and I
still haven't been released to give the code away or I would have already.
But, I think I can describe the cache that I implemented in the hopes that
someone else will do the same so that everyone can use it.  It is a very
small amount of code and very simple to implement.

99% (if not 100%) of the things that should be cached that impact a test
have a content-type that starts with "image/".  I can't remember the last
time I saw a "text/" type that should be cached.  What I did was to copy the
cookie manager code and create a cache manager.  If there is one (a cache
manager), then for every response that has a content type that starts with
"image/", save the last modified time and the full url (not relative url).
For every request sent, see if the manager has a matching url.  If so, stick
an If-modified-since into the request headers using the last-modified time
saved by the manager.  This way we get 304 Not Modified responses instead of
fetching the whole thing.  There are other small details like stripping
other caching tags from the headers, clearing the cache after each iteration
(optional so needs a checkbox on the manager dialog) and removing 304 (Not
Modified) from the list of REDIRECT_CODES since it really isn't a
redirection in the first place.


----- Original Message ----- 
From: "sebb" <[EMAIL PROTECTED]>
To: "JMeter Users List" <[email protected]>
Sent: Tuesday, March 01, 2005 7:44 AM
Subject: Re: <link> element should be ignored


> On Mon, 28 Feb 2005 18:07:35 -0600, Danny R. Faught
> <[EMAIL PROTECTED]> wrote:
> > Hi, I'm trying to set up a load test using JMeter 2.0.2 running on
> > Windows XP.  This item in the head section of all the pages on the site
> > is causing problems:
> >
> > <link rel="alternate" type="application/rss+xml" title="RSS"
> > href="/blog/index.xml">
> >
> > I'm not sure what it's supposed to do - it doesn't seem to cause
> > browsers to hit the href automatically.  But JMeter does hit it when I
> > use an HTTP Request sampler with "Retrieve all embedded resources"
> > turned on.  Since that's not what the browsers are doing, it's skewing
> > the test results, especially since it pulls down this extra file on
> > every page hit.
> >
> > Anybody know why JMeter thinks this is an embedded resource?
>
> Probably because Jmeter is not taking note of the "rel" attribute -
> which is a bug.
> AFAIK the same <link> tag is used for external CSS files, which should
> be downloaded. These use a different rel attribute.
>
> Jmeter also does not (yet) cache the downloaded resources, so it will
> download images every time, which a browser would not do.
>
> So if you want a more accurate test, you should probably switch off
> "Retrieve all embedded resources" anyway, and download the extra
> resources manually.
>
> > --
> > Danny R. Faught
> > Tejas Software Consulting
> > http://tejasconsulting.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to