Results 1 to 6 of 6
  1. #1

    Default Sideboxes Re-load for each page transition...

    Since I'm using javascript to round the corners of the sideboxes, I don't want the script to re-load on every page change.

    The script is over 25k, so always being loaded every page is undesirable.

    The javascript is located in the jscript folder in the My_template directory and is correctly named.

    Is there any way that this script could load just once instead of loading on every page???

    The website is fabstash.com


    Many Thank Yous.

  2. #2
    Join Date
    Apr 2008
    Location
    London
    Posts
    596
    Plugin Contributions
    0

    Default Re: Sideboxes Re-load for each page transition...

    Why are you using a 25k script for something so small? Images would weigh less than that.

  3. #3

    Default Re: Sideboxes Re-load for each page transition...

    true. I'm not sure I know how to go about making the images though, that is something that has stumped me in the past.

    these javascript sideboxes are pretty cool too, they allow for a complete image or gradient fill of your box. Lots of potential for cool things with that! So you can see why I would attempt to keep the boxes first.

  4. #4

    Default Re: Sideboxes Re-load for each page transition...

    I guess the point is that if I can have the 25k javascript loading once, I would be using a cool script that outdoes rounded corners with just css and is worth its weight so to speak.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Sideboxes Re-load for each page transition...

    If the javascript is in a .js file on the filesystem and is being loaded in a src= parameter of a <script> tag, then the browser should already be caching it and therefore only actually downloading the .js file when the cache expires or on the first visit to the site ... not every page.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6

    Default Re: Sideboxes Re-load for each page transition...

    Quote Originally Posted by DrByte View Post
    If the javascript is in a .js file on the filesystem and is being loaded in a src= parameter of a <script> tag, then the browser should already be caching it and therefore only actually downloading the .js file when the cache expires or on the first visit to the site ... not every page.
    o.k. The browser may not be reloading the script on each page transition, but it is redrawing the corners for the sideboxes with each page transition. I guess visually, since the corners are the last thing to load on the page, it would be nice to have them load first. Any ideas, or is this not something that can be (or is worth it) done?

    ~Rain

 

 

Similar Threads

  1. v155 Creating Groups For Each Customer With Specific Discounts For Each Manufacturer
    By CSGODeimos in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 7
    Last Post: 30 Aug 2016, 11:39 AM
  2. select each new banner for each web page
    By OLIVIER72 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 17 May 2010, 06:58 PM
  3. page transition not smooth..
    By ljbird in forum Templates, Stylesheets, Page Layout
    Replies: 17
    Last Post: 10 Jan 2010, 07:04 PM
  4. Index Page Slideshow Not Showing Transition Effects
    By joomoo79 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 6 Dec 2009, 05:21 AM
  5. javascript reloads on every page transition.
    By rainthebat in forum General Questions
    Replies: 1
    Last Post: 3 Aug 2008, 03:37 AM

Posting Permissions

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