Oneness - True Faith
wizanda
Theme Speed Improvment Through Using .Js files Posted on: 2007/1/9 21:16
Helper
Joined:
2004/3/26 7:04
From Nottingham, UK
Posts: 2819
Though I have written this up on Xoops

Here is a Quick look at something I just learned is possible in all web design...

Basically I found something someone had done, where they placed the HTML code into a .JS file same code, yet called it a cache file ....


So Later on trying this same, I found it did indeed improve loading times of HTML and act as a cache....

Yet on later Experiments realized it also does more then just cache especially with all the talk by many of AJAX...which in many cases is PHP, Java and Html......


Decided to do a bit more playing.....So now you find the page loading time has increased slightly in some cases to begin.....

Yet after the original loading, it is cached in your pc, instead of loading the same content on each page; now it is loaded once and stored by the PC for later use.....


Now like I say I am discussing this with Xoops, yet it can be used in any HTML.....so instead of waiting ages for complicated tables and layout structure......You can instead place this in a .js file for the same bit of HTML code....just in having it load as .JS it vastly increases speed....and acts as a Cache as such....


Now in the Xoops case we have used Smarty to the include these files....so then when the file is called Smarty has it already to be filled, it then finds what it is filling faster...and also seems to pre-get the items in question the same as if it was being done by AJAX....


Since including the For each in the Xoops blocks layout now in a .JS it now loads that separately to the theme overall...so reducing sluggishness that is seen by many sites...

N B with U
Transfer Print PDF Bookmark Top
Top Previous Topic Next Topic
Register To Post