Welcome to TalkGraphics.com
Page 3 of 3 FirstFirst 123
Results 21 to 22 of 22
  1. #21
    Join Date
    Aug 2000
    Harwich, Essex, England

    Default Re: Leveraging the Conventional Website

    No, not using the file in ernest, just trying your technique at present..

    Ernest say's will I leave him alone now.

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  2. #22
    Join Date
    Apr 2012
    SW England

    Default Re: Leveraging the Conventional Website

    In the first Post, I mentioned an ASIDE about pre-loading all the images for a Conventional website.
    The point of this Thread was to see if the features in an A-site and a C-site could be delivered by a D-site solution.
    The development indicates mostly.

    Where these sites gain is in the speed of switching pages. The down side is the length of time the initial download takes until the site is fully functional as all the pages are bundled into the only HTML file.

    Working on the test file, and enabling WebP (95% of users' browsers can use WebP), I have found that I can defer the download of the remaining website WebP images until after the first-accessed page is ready.
    The same file as an A-site or D-site would download 1.5MB before being useable.
    The D-site is 500kB, with the remaining 1MB loading in the background and is usually complete before you have read the first sentence.
    Each page transition for the A-site or D-site is an additional 6kB of network traffic; the D-site (this approach) is near 11kB. Neither is significant and ultimately the page change is no different to a viewer in bandwidth delay.

    If you are checking with Xara's Preview, you will not see any caching as Xara enables a no-cache rule.

    The code is in the Website section.
    The head has an additional two lines to get a list of WebP images used in the website.
      images = asite.replaceAll('\r', '').split('\n').filter(x => x.search(/\.webp/) > 0 );
      images = [...new Set(images)];
    The body has a new function that is clled after a short delay:
    function preloadImages(array) {  if (!preloadImages.list) {
        preloadImages.list = [];
      var list = preloadImages.list;
      for (var i = 0; i < array.length; i++) {
        var img = new Image();
        img.onload = function() {
          var index = list.indexOf(this);
          if (index !== -1) {
            list.splice(index, 1);
        img.src = array[i];
    setTimeout(function(){ preloadImages(images); }, 320);
    In the test file I set the delay to 160mS; you need to trial the value best met by your service provider and expected download speed for getting the xr_files.txt file.

    The Ultimate Conventional Website - Step 9.xar

    Acorn - installed and active Xara software: Cloud+/Pro+, XDPX, XWD Premium 15 & 12, XPGD10, X3D7, Xara Xtreme 5, back through time (to CC's Artworks).
    Raise software faults with MagiXara: http://support.magix.net/; if Cloud+/Pro+: https://xara.com/contact-us/



Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts