{"data":{"id":16,"slug":"detecting-lazy-loaded-content-16","title":"Detecting lazy-loaded content","excerpt":"Lazy loading defers images and sections until they are about to scroll into view. A script that reads the page immediately sees placeholders instead of content.","seriesName":"Detecting lazy-loaded content","seriesPart":1,"sections":[{"heading":"Introduction","paragraphs":["Lazy loading defers images and sections until they are about to scroll into view. A script that reads the page immediately sees placeholders instead of content."]},{"heading":"What to watch for","paragraphs":["Time zones matter more than they seem. Store timestamps in UTC and convert only when displaying them.","Before writing a single line of code, look at how the page actually loads its data. Open the network panel, reload, and note which requests return the content you care about. Very often the data you want arrives as JSON from an endpoint you can call directly."]},{"heading":"Common pitfalls","paragraphs":["Validate the data you extract. Prices without currencies, dates without time zones and empty fields are common sources of silent errors downstream.","Character encodings still cause trouble. Decode responses using the charset the server declares, and normalise text before comparing or storing it."]},{"heading":"Key takeaway","paragraphs":["Scroll the element into view and wait for its real attributes to appear, or read the data-src style attributes that hold the eventual values."]}],"authorId":7,"authorName":"Kwame Mensah","authorSlug":"kwame-mensah","category":"Browser Automation","tags":["http"],"publishedAt":"2024-12-28T00:00:00.000Z","wordCount":157,"readingTimeMinutes":2}}