Announcement

Collapse
No announcement yet.

JavaScript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    JavaScript

    Dear All,

    Since I am not a JavaScript guy I would like to know what the following does and how it affects me as a Module Developer:

    1. JSON JavaScript File
    2. Ajax JavaScript File
    3. AttributeMachine JavaScript File
    Thank You,

    Nerd Boy

    http://www.nerdboyinc.com

    1-855-Nerd-Boy

    #2
    Re: JavaScript

    ...nothing. <g>

    They are just helper files containing fucntions that Merchant is calling to perform some of its new tricks.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Re: JavaScript

      Ajax is good for cleaning toilets.

      Comment


        #4
        Re: JavaScript

        How can I add type="text/javascript" to those three scripts that are called, so that the pages can validate with a strict dtd?

        <script src="http://mysite.com/mm5/clientside.mvc?Filename=ajax.js"></script>
        <script src="http://mysite.com/mm5/clientside.mvc?Filename=runtime.js"></script>
        <script src="http://mysite.com/mm5/clientside.mvc?Filename=AttributeMachine.js"></script>

        Comment


          #5
          Re: JavaScript

          Readytheme Suivant slow and low pagespeed score.

          I want to defer these files too as they are getting REMOVE RENDER BLOCKING errors via Google Pagespeed.

          Any suggestions?

          I have a script:

          <script type="text/javascript">
          function downloadJSAtOnload() {
          var element = document.createElement("script");
          element.src = "defer.js";
          document.body.appendChild(element);
          }
          if (window.addEventListener)
          window.addEventListener("load", downloadJSAtOnload, false);
          else if (window.attachEvent)
          window.attachEvent("onload", downloadJSAtOnload);
          else window.onload = downloadJSAtOnload;
          </script>

          and it works fine on all files except these.

          <script src="http://mysite.com/mm5/clientside.mvc?Filename=ajax.js"></script>
          <script src="http://mysite.com/mm5/clientside.mvc?Filename=runtime.js"></script>
          <script src="http://mysite.com/mm5/clientside.mvc?Filename=AttributeMachine.js"></script>


          Any help appreciated.
          James Byrne, (USMC Vet.)
          After Dark Grafx
          "We Work After Dark So You Don't Have To!"
          E-Commerce - Design - Hosting - Printing
          Miva Standard Partner. Get up and running fast!
          http://www.afterdarkgrafx.com :: sales [ at ] afterdarkgrafx.com

          Comment


            #6
            Re: JavaScript

            Miva requires those JS files high up in the page because they must be loaded before certain parts of the HTML. They can't be delayed or moved to the footer currently. I'm going to talk to our development team and see if we can change this in the future.

            In the big scheme of things, there are much better page speed optimizations you can make other than this. These files get cached after the first page load, so all subsequent page loads are faster.
            Brennan Heyde
            VP Product
            Miva, Inc.
            [email protected]
            https://www.miva.com

            Comment


              #7
              Re: JavaScript

              Brennan:
              Thank you for the reply. I kind of figured that. Are they already compressed?

              I found steve soule's minify github but that is just for css and I already have the css minified and all javascript files that we control are minified as well just need these files deferred OR load as one file? We are getting page deferred hit in gtmetrix and pagespeed with google. But I understand if they have to load in succession.

              Thank you,
              James





              Originally posted by Brennan View Post
              Miva requires those JS files high up in the page because they must be loaded before certain parts of the HTML. They can't be delayed or moved to the footer currently. I'm going to talk to our development team and see if we can change this in the future.

              In the big scheme of things, there are much better page speed optimizations you can make other than this. These files get cached after the first page load, so all subsequent page loads are faster.
              James Byrne, (USMC Vet.)
              After Dark Grafx
              "We Work After Dark So You Don't Have To!"
              E-Commerce - Design - Hosting - Printing
              Miva Standard Partner. Get up and running fast!
              http://www.afterdarkgrafx.com :: sales [ at ] afterdarkgrafx.com

              Comment

              Working...
              X