About the StreamingHttpResponse and SEO

StreamingHttpResponse allows rendering the <head> and the content in the header or above the fold immediately, and stream the rest afterwards in chunks as in this example.

However, you must take these factors into account when preparing views for crawlers:

  • Time to First Byte (TTFB) - how long it takes for the first content to be sent from the server (StreamingHttpResponse rocks there).
  • Time to send the whole document. If it's less than 2 seconds, you are safe! If it's more than 5 seconds, the crawler can either abandon the page as unreachable or index it only partially.
  • Crawlers (GPTBot, ClaudeBot, Googlebot, etc.) are standard HTTP clients — they reassemble chunked responses transparently and see a complete document. Streaming is invisible to them, so StreamingHttpResponse is fully compatible with crawling as long as the full document arrives within the time budget above.
  • LLM-based answer engines require clean, unambiguous, fully-rendered text and don't support JavaScript-rendered content.

So for SEO, AEO, and GEO, watch out for: - JavaScript-rendered content (e.g. AI-generated text appended after page load) — crawlers won't execute JS, so this content won't be indexed. - Content behind login — not crawled regardless of how it's served. - Large file downloads — serve these from a separate endpoint so slow transfers don't count against your document time budget.

Tips and Tricks Programming Optimization Search Engine Optimization (SEO) Answer Engine Optimization (AEO) Generative Engine Optimization (GEO) Django 6.x Django 5.2 Django 4.2 ASGI Uvicorn Daphne HTTP streaming