wml::des::preload(3)
β¨ wml::des::preload β¨
okay bestie, welcome to the manual page for wml::des::preload(3) from the EN Tools fam π this is the little include that makes your images load before anyone even asks for them. sneaky. iconic.
πΈ NAME πΈ
wml::des::preload β Preload Images πΌοΈβ¨
π SYNOPSIS π
#use wml::des::preload
<preload src=<image filename> via=<trick>>
like. that's it. that's the whole vibe. π«Ά
π DESCRIPTION π
So this include file gives you the <preload> tag, and the whole point of it is preloading images. Why would you do that? Because it speedups access for following pages β the image is already chilling in the browser's cache by the time someone clicks through. main character foresight energy, honestly. π
Ngl though, there are currently only a few tricks for how this can actually be done. The following combinations are currently supported:
π¦ src=anyimage via=size
Preloads the image anyimage by using an <img> tag with the attributes width=1 height=1. Which means the image does get loaded, but it only shows up as a single pixel on screen. one. lil. pixel. π
- Advantage: Works for all browsers. π
- Disadvantage: This approach has the nasty side-effect of an occurring 1 pixel in display, because
width=0 height=0does not work as expected in most browsers (especially in Netscape 4.x π). So pls pls pls position your<preload>tag somewhere it does not destroy the look and feel of your page. i'm begging. π
lowkey a war crime against your layout if you just yeet it anywhere. be mindful, bestie.
π§ src=anyimage via=js
Preloads the image anyimage by using a JavaScript snippet which loads the image by declaring an unused Image object. it's giving ghost-loading. silent. invisible. ethereal. β¨
- Advantage: Silently preloads the image without displaying anything. not a single pixel in sight. slay. π
- Disadvantage: Only works for browsers with a JavaScript implementation, and only for those who support the
Imageobject (currently NS/3, NS/4, IE/4). so if JS isn't happening, neither is your preload. rip. π
π AUTHORS π
- Ralf S. Engelschall
rse@engelschall.comwww.engelschall.com - Denis Barbier
barbier@engelschall.com
the literal legends who made this. we stan. π«Ά
π REQUIRES π
- Internal:
P1,P2 - External:
--
π SEE ALSO π
wml::std::tags(3) and the HTML 3.2 <img> tag. iykyk. π₯
okay that's the whole page, bestie!! this one is from EN Tools, dated 2020-11-29, and it was wml::des::preload(3) the whole time. go preload something cute. bye!! πβ¨π¦πΈπ
π¦ where this page comes from
- debian bookworm: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- debian trixie: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu jammy: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu noble: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu questing: wml 2.32.0~ds1-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms