Scrutinize Resources
Resources used by web applications include HTML, CSS, JavaScript, plain text, JSON, XML, SVG, images, audio, videos, fonts, and more.
Web applications can download resources in several ways. HTML elements such as a (anchor), audio, form, img, link, script, and video all have an attribute that specifies the URL of a resource to download. The JavaScript function fetch and the XMLHttpRequest open method also download a resource.
Web applications should only download resources from trusted sites. The best case scenario is to only send HTTP requests to endpoints that you control.
Fortunately, when using htmx, the endpoints that return HTML to be inserted into the page are nearly always at the same domain as the web app. Htmx version ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access