From: James Britt Date: 2005-11-30T13:49:23+09:00 Subject: Re: WWW::Mechanize with frames Jim Van Fleet wrote: > On Wed, 2005-11-30 at 11:14 +0900, James Britt wrote: > >>AlexG wrote: >>I do not think that Mechanize handles frames by default, but you could >>teach it to grab the frame elements and parse the src attribute, then >>construct the full URL. >> >>James > > > Having done a bit of this in the past, there may be quite a bit more to > it. You'll notice that the original page claims that your client > doesn't support frames. Often, it'll base that decision off what > user-agent header you're sending in the request. Doubtful. I suppose that the content might have been dynamically generated on the server but my experience with creating frames pages is to that it is pretty standard to always include a noframes section for browsers that do not know what to do with frames elements; the noframes section is simply rendered by default by older browsers, while frames-enabled browsers know to ignore it. http://www.w3.org/TR/REC-html40/present/frames.html#h-16.4.1 Fetch the frames page in Firefox and do View Source and look at the markup. For example, this is a frames page: http://www.adobe.com/svg/viewer/install/main.html It renders fine in FF, which clearly knows how to handle frames, but you'll notice that the source HTML looks like this: Web Center Features - SVG - Manual Download Your Web browser does not support frames. Please <A HREF="mainframed.html">click here</A>. James -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools