Skip to content

How to access protected pages

Ophir LOJKINE edited this page Jan 15, 2021 · 7 revisions

Zoomable image viewing pages can be restricted in different ways.

  1. Sometimes, they are on a site where you have to be logged in to view the images.
  2. Sometimes, the site tries to detect where you are requesting the image from. If you are requesting it from a foreign site, it may return a 403 Forbidden response.

In both cases, the restriction can be lifted by sending the right HTTP headers to the site. dezoomify has some support for that.

When you have to be logged in to access the image viewer

In the first case, when the page is protected by login, the site usually learns about the connected users via cookies. You can have dezoomify send the necessary cookies to the site by following this procedure:

  • Find the cookie that authenticates you on the site.
  • Open dezoomify.
  • Open the web console inside dezoomify. (In firefox: Ctrl-Maj-K)
  • Type: ZoomManager.cookies = "Cookie1=Value1; Cookie2=Value2"(replace Cookie1, Value1, etc., by the actual name of your cookies, that you found at step 1).
  • Paste the Url of your session-protected page in dezoomify, as you would do normally.
  • Press Submit
  • Enjoy

When the site tries to check that the image is not requested from another site

During normal navigation, when loading a new page, your web browser sends to the server the URL of the previously visited page, in the Referer HTTP header. When loading the image tiles from dezoomify, your browser sends to the image server the information that you are currently visiting dezoomify, and not their own site. Some servers might then block the request, and return a 403 Forbidden response.

Dezoomify has an option to proxy tile requests through another server instead of loading them directly from your browser. This other server can then spoof the Referer header, to hide the fact that the request does not come from the site itself.

In order activate the tile proxy, just open your browser console before starting the dezoomification, and type:

ZoomManager.proxy_tiles = "proxy.php";

If you need to set a particular header

If your site has more particular restrictions, and you have to set a certain HTTP header to a certain value, then you can use dezoomify-rs. It lets you set the HTTP headers to send when requesting tiles.

./dezoomify-rs --header "Referer: url-of-the-viewing-page" "url of the meta file"