YAP Image Cache - Common Q & A

There have been many questions around image caching on the Yahoo! Application Platform (YAP). To that end, the YAP engineering team has created some documentation to answer many of the common questions you all have. Please let us know if there are any other questions you may have around image cache on YAP.

What goes through YAP image cache?

The Yahoo! Application Platform (YAP) will process the application's markup and rewrite all image URLs that are not owned by Yahoo! in your application. These URLs will be served via the image cache.

What are the supported content types?

The YAP image cache server currently supports the following content types: "image/gif", "image/png", "image/jpeg", "image/jpg", "image/bmp"

A request with any other content type will be rejected by the image cache server as a bad request.

Example Response:
HTTP/1.1 400 Bad Request
<title>Error 400 Unsupported content type</title>
<body><h2>HTTP ERROR: 400</h2><pre>Unsupported content type</pre></body>

How many redirects will the image cache server follow?

The image cache server will follow three redirects.

How do I invalidate my images?

Developers will need to version their image URLs and simply update the URL as needed.

What is the purpose of the image cache system?

  1. Verify that the image does not contain malicious content.
  2. Distribute images to application users around the world.
  3. Prevent 'beaconing' in scenarios where a viewer has not agreed to application access.

HTTP Caching Headers

  1. The image cache server only honors the Cache-Control header returned by the origin server.
  2. All other cache headers will be stripped by the cache server, including the Expires, Pragma, and Last-Modified headers.
  3. If the max-age attribute is set to something less than a threshold, it will be rewritten to this threshold. In the production, the threshold is set as one day. This rule is in place for performance reasons. Yahoo! might adjust this threshold up and down depends on system load.

My image is being rejected

  1. Verify the size for your image do not exceed 800 x 600 pixels.
  2. Verify your server is correctly setting the Content-Type header for your images.
  3. Verify your images are available and can be hit by the image cache server
  4. Verify the image is served over http. YAP image cache currently does not support image serving over HTTPS

0 Replies

Recent Posts

in YAP