javascript - Delaying loading of resources -
my question is, there way first let website display , load heavy resources using javascript whilst preserving functionality in case javascript not available?
my reason: i'm trying optimize joomla template. there pretty heavy resources oversized background images. test case features 4000px*3000px 3.01mb .png picture. although showed me this solution, cannot use since plan use background-image if there no javascript. plus have come myself...
it make things lot easier if give me solid proof internet users use javascript... i'm talking 99.999%.
regardless, has impact on total time until website displayed. there resource i'd use technique on, php script run joomla plugin taking 1 second respond, impacting total time.
ultimately i'd control when specific resources loaded.
my own attempt: thought of removing background-image
style of related elements, timeline still didn't change. renders lot quicker since browser has less work do, still picture being loaded.
if add swap class on <html>
tag using js modernizr (it swaps .no-js
.js
can selectively add images browsers don't have js enabled.
then can happily create new image
object, load , change elements style when it's ready.
Comments
Post a Comment