/s', // strip whitespaces after tags, except spaceĭownload the turbo.php, upload it where Opencart is installed, run YOURSITEURL/turbo.php and click the “Add Database Indexes” button, this will index all the database table as per column name. Return $this->adaptor->render($template, $cache) Minify($this->adaptor->render($template, $cache)) $this->output = preg_replace("/\>\r\noutput) # END Caching LBROWSERCEND Compress and minify the output Header append Cache-Control “proxy-revalidate”ĮxpiresByType image/x-icon “access 1 year”ĮxpiresByType text/javascript “access 1 month”ĮxpiresByType application/javascript “access 1 month”ĮxpiresByType application/x-javascript “access 1 month”ĮxpiresByType application/xhtml-xml “access 1 month”ĮxpiresByType application/pdf “access 1 month”ĮxpiresByType application/x-shockwave-flash “access 1 month” htaccess file, these are just our idea, you can make changes as per your requirement: # Set up 1 week caching on javascript and CSS You can serve static assets with efficient cache policy by adding the following code in the. Speed up the repeat visit by serving static assets with efficient cache policy With these, it minimizes the byte size of network responses and fewer bytes means page loads fast. The value should be 0-9, what we find out is most of the time it works above 5 but hit and trial is the only option that we see. To enable the text compression in Opencart, go to Admin > System > Settings > Server tab > Add the “Output Compression Level”. Gzip Compression is an effective way to reduce the size of files. The compression level must be between 0 – 9. GZIP for more efficient transfer to requesting clients. Ĭreated one module for lazy loading of the image: With just adding loading=”lazy” in the image tag it will lazy load the images. Go to Admin > Extensions > Extensions > Choose Theme as extension type > Then edit your active theme > Then enter the sizes for Images in the ratio of 16:9, like we are using it as: So, create images of size 1200px width and 675 px height and in all settings use a 16:9 ratio. One idea to size the image is to use the ration in all image settings. The following are the Ocmod XML which make those changes. For jQuery, we load at first because it is building block so we load at header and without defer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |