|
|
Redirections
When loadURL is called, it is possible for
either the server (directly) or the loaded page (indirectly) to cause a page
redirection to a different URL. In the
case where the server causes a page redirection, no onDocumentComplete event is
generated until the page to which the redirection has happened has completed
loading. In the case where a loaded page itself
causes a redirection (for example, the following HTML tag causes an immediate
reload of another page)..
<meta http-equiv="refresh"
content="0;URL=�redirecttothispage.html�>
..two onDocumentComplete
events are received. One is for the original page containing the
redirection tag (which is correct, as a document has been loaded), and another
for the page to which redirection has occurred (when it completes loading). Pages may also redirect via other
methods. When using the
onDocumentComplete event for triggering a savePageToBitmapImage, you will need
to cater for the possibility of multiple page loads as described above by
either saving to different image names, or by at least being aware that the
first document image saved will show the content of the redirecting page (which
may be blank).
Active Content
WebRenderer Server Edition is designed to create static rendered
images and thumbnails of web pages. Some pages have dynamic content (such as
Flash animations, plug-in applets, and animating GIF files -- and even sound!).
Clearly it is not expected that these are to be rendered to an image; the best
we can do is choose reasonable behaviour. Animating GIF files will render the
first image in the animation sequence. All other active content is ignored.
Stealthy Redirection & Frames
Some websites use 'stealth'
redirection to mask the URL of page content by including a link to the actual
content URL inside a single frame. WebRenderer Server Edition may render
this sort of page with a visible scrollbar. To avoid this situation, use the
page URL to which the stealth redirection is pointing instead of the stealthy
page.
|