{"id":69131,"date":"2025-07-23T03:01:00","date_gmt":"2025-07-22T17:01:00","guid":{"rendered":"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=69131"},"modified":"2025-07-22T13:23:00","modified_gmt":"2025-07-22T03:23:00","slug":"html-element-preload-attribute-browsing-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/html-element-preload-attribute-browsing-tutorial\/","title":{"rendered":"HTML Element Preload Attribute Browsing Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/\/HTMLCSS\/media_preload.html\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"HTML Element Preload Attribute Browsing Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/preload_idea_browsing.gif\" title=\"HTML Element Preload Attribute Browsing Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">HTML Element Preload Attribute Browsing Tutorial<\/p><\/div>\n<p>Two ideas, today, onto yesterday&#8217;s <a title='HTML Element Preload Attribute Primer Tutorial' href='#htmlepapt'>HTML Element Preload Attribute Primer Tutorial<\/a> &#8230;<\/p>\n<ol>\n<li>on iPhone types of mobile the <i>preload=&#8221;none&#8221;<\/i> <i>video<\/i> used to be reduced to nothing, and this situation <font color=blue>was improved via<\/font> &#8230;<br \/>\n<code><br \/>\n&lt;table id=mytable style=\"width:100%;\"&gt;<br \/>\n&lt;tr&gt;&lt;th style=\"overflow-y:hidden;\" colspan=3&gt;Media &lt;select id=mysel onchange=process(this);&gt;&lt;option value=video&gt;Video&lt;\/option&gt;&lt;option value=audio&gt;Audio&lt;\/option&gt;&lt;option value=image&gt;Image&lt;\/option&gt;&lt;\/select&gt; Preload Attribute Effects &lt;iframe class=\"spag\" scrolling=\"no\" onload=\"limitb(this);\" id=\"cbi\" frameborder=\"0\" style=\"overflow-y:hidden;width:173px;height:218px;margin-top:-204px;\" data-accept=\"video\/*audio\/*\" src=\"\/HTMLCSS\/client_browsing.htm\"&gt;&lt;\/iframe&gt;&lt;\/th&gt;&lt;\/tr&gt;<br \/>\n&lt;tr&gt;&lt;th&gt;none&lt;\/th&gt;&lt;th&gt;metadata&lt;\/th&gt;&lt;th&gt;auto&lt;\/th&gt;&lt;\/tr&gt;<br \/>\n&lt;tr&gt;&lt;td style=\"<font color=blue>width:33%;<\/font>background-color:rgba(255,0,0,0.1);\" id=preloadnone&gt;<br \/>\n&lt;video style=\"width:100%;\" preload=\"none\" controls&gt;&lt;source src='\/\/www.rjmprogramming.com.au\/bluetooth_movie.mp4' type='video\/mp4'&gt;&lt;\/source&gt;&lt;\/video&gt;<br \/>\n&lt;\/td&gt;&lt;td style=\"<font color=blue>width:33%;<\/font>background-color:rgba(255,255,0,0.1);\" id=preloadmetadata&gt;<br \/>\n&lt;video style=\"width:100%;\" preload=\"metadata\" controls&gt;&lt;source src='\/\/www.rjmprogramming.com.au\/bluetooth_movie.mp4' type='video\/mp4'&gt;&lt;\/source&gt;&lt;\/video&gt;<br \/>\n&lt;\/td&gt;&lt;td style=\"<font color=blue>width:33%;<\/font>background-color:rgba(0,255,0,0.1);\" id=preloadauto&gt;<br \/>\n&lt;video style=\"width:100%;\" preload=\"auto\" controls&gt;&lt;source src='\/\/www.rjmprogramming.com.au\/bluetooth_movie.mp4' type='video\/mp4'&gt;&lt;\/source&gt;&lt;\/video&gt;<br \/>\n&lt;\/td&gt;&lt;\/tr&gt;<br \/>\n&lt;\/table&gt;<br \/>\n<\/code><br \/>\n &#8230; and then there was the matter of &#8230;\n<\/li>\n<li>content choices were pretty static but we thought that could be bettered by offering the user the chance to browse for local media files themselves &#8230;<br \/>\n<code><br \/>\nfunction lookforresult() {<br \/>\n  if (document.getElementById('result').innerHTML.indexOf('data:') == 0) {<br \/>\n    durl=document.getElementById('result').innerHTML;<br \/>\n    document.getElementById('result').innerHTML='';<br \/>\n    if (durl.indexOf('data:image\/') == 0) {<br \/>\n      document.getElementById('cto').value=durl;<br \/>\n      document.getElementById('myif').src='.\/media_preload.html?called=' + Math.floor(Math.random() * 19897865);<br \/>\n      document.getElementById('myif').style.display='block';<br \/>\n    } else if (durl.indexOf('data:video\/') == 0) {<br \/>\n      templates[0]=templates[1].replace(templates[0].split(\" src='\")[1].split(\"'\")[0], durl);<br \/>\n      document.getElementById('mysel').value='video';<br \/>\n      process(document.getElementById('mysel'));<br \/>\n    } else if (durl.indexOf('data:audio\/') == 0) {<br \/>\n      templates[1]=templates[1].replace(templates[1].split(\" src='\")[1].split(\"'\")[0], durl);<br \/>\n      document.getElementById('mysel').value='audio';<br \/>\n      process(document.getElementById('mysel'));<br \/>\n    }<br \/>\n  }<br \/>\n}<br \/>\n<br \/>\nsetInterval(lookforresult, 5000);<\/code>\n<\/li>\n<\/ol>\n<p> &#8230; <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/media_preload.html-GETME\" rel=\"noopener\">in a second draft<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/media_preload.html-GETME\" rel=\"noopener\">media_preload.html<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/\/HTMLCSS\/media_preload.html\" rel=\"noopener\">idea<\/a> for you today.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=\"_blank\" href='\/\/www.rjmprogramming.com.au\/ITblog\/html-element-preload-attribute-browsing-tutorial\/' rel=\"noopener\">HTML Element Preload Attribute Browsing Tutorial<\/a>.<\/p-->\n<hr>\n<p id='htmlepapt'>Previous relevant <a target=\"_blank\" title='HTML Element Preload Attribute Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/html-element-preload-attribute-primer-tutorial\/' rel=\"noopener\">HTML Element Preload Attribute Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/\/HTMLCSS\/media_preload.html\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"HTML Element Preload Attribute Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/preload_idea.png\" title=\"HTML Element Preload Attribute Primer Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">HTML Element Preload Attribute Primer Tutorial<\/p><\/div>\n<p>We have a very simple media &#8230;<\/p>\n<ul>\n<li>video<\/li>\n<li>audio<\/li>\n<li>image<\/li>\n<\/ul>\n<p> &#8230; <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/\/HTMLCSS\/media_preload.html_GETME\" rel=\"noopener\">&#8220;proof of concept&#8221;<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/\/HTMLCSS\/media_preload.html\" rel=\"noopener\">idea<\/a> for you today, touching on ideas with web browser web applications concerning the preloading, or not, for media files.<\/p>\n<p>With video and audio elements, this can involve the use of the HTML element attribute &#8230;<\/p>\n<p><code><br \/>\n<a target=\"_blank\" title='HTML element preload attribute' href='https:\/\/www.w3schools.com\/tags\/att_preload.asp' rel=\"noopener\">preload<\/a><br \/>\n<\/code><\/p>\n<p> &#8230; while for images, they can be helped with preloading via an HTML link element such as &#8230;<\/p>\n<p><code><br \/>\n&lt;link rel=\"preload\" href=\"\/inhouse_slideshow_css.jpeg\" as=\"image\" type=\"image\/jpeg\" \/&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; within the head element.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d69128' onclick='var dv=document.getElementById(\"d69128\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/attribute\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d69128' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d69131' onclick='var dv=document.getElementById(\"d69131\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/browsing\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d69131' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Two ideas, today, onto yesterday&#8217;s HTML Element Preload Attribute Primer Tutorial &#8230; on iPhone types of mobile the preload=&#8221;none&#8221; video used to be reduced to nothing, and this situation was improved via &#8230; &lt;table id=mytable style=&#8221;width:100%;&#8221;&gt; &lt;tr&gt;&lt;th style=&#8221;overflow-y:hidden;&#8221; colspan=3&gt;Media &lt;select &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/html-element-preload-attribute-browsing-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,29,37],"tags":[112,113,1993,3531,2507,1549,5239,576,5238,587,590,1807,4772,760,5241,5240,997,5242,1319,3873,1369],"class_list":["post-69131","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-operating-system","category-tutorials","tag-attribute","tag-audio","tag-browse","tag-browsing","tag-dimension","tag-element","tag-element-attribute","tag-html","tag-html-element","tag-iframe","tag-image","tag-link","tag-local-file","tag-media","tag-percentage-unit","tag-preload","tag-programming","tag-rel","tag-tutorial","tag-unit","tag-video"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/69131"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=69131"}],"version-history":[{"count":6,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/69131\/revisions"}],"predecessor-version":[{"id":69137,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/69131\/revisions\/69137"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=69131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=69131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=69131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}