Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    10,732
    Plugin Contributions
    79

    Default File Auto-Versioning (CSS, JS, etc) for Templates [Support Thread]

    Starting with Zen Cart® 1.5.2, additional rules have been added to your store's /includes/.htaccess instructing the customer's browser to cache images, PDFs, CSS and javascript files for certain periods. While that caching provides your site with a performance "boost", it's not without cost … what happens if you've added a plugin that adds some styling to your current template's stylesheet.css? The short answer is that until the customer specifically refreshes their browser or clears their browser's cache (possibly multiple times), those changes won't be pulled from your site because the browser has been told to cache that file's contents!

    That's where File Auto-Versioning comes into play. You can use this plugin to add a version string to those file "assets" so that your customers' browsers are always pulling in the most recent content.

    I'll be submitting this to the Plugins in a bit and will update this support-thread once I've got a download link.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    10,732
    Plugin Contributions
    79

    Default Re: File Auto-Versioning [Support Thread]

    Here's the link for the Zen Cart Plugins download (once reviewed): https://www.zen-cart.com/downloads.php?do=file&id=2116

  3. #3
    Join Date
    Jan 2004
    Posts
    66,350
    Blog Entries
    7
    Plugin Contributions
    271

    Default Re: File Auto-Versioning [Support Thread]

    Would it be safe to say this should be called "Asset Auto-Versioning" instead of merely "File Auto-Versioning"?
    .

    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.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    10,732
    Plugin Contributions
    79

    Default Re: File Auto-Versioning [Support Thread]

    Quote Originally Posted by DrByte View Post
    Would it be safe to say this should be called "Asset Auto-Versioning" instead of merely "File Auto-Versioning"?
    Kind of, sort of ... I guess. The point is that the auto-version is the return value from the PHP filemtime function, so whether its a file or an asset there's a file involved.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,350
    Blog Entries
    7
    Plugin Contributions
    271

    Default Re: File Auto-Versioning [Support Thread]

    Agreed. I was looking at it from the perspective of someone looking at a list of plugins and trying to understand what they do by their name, and deciding whether they might need to install it on their shop. It felt like "file versioning" might imply "managing versions of every file in my Zen Cart", thus maybe more of an upgrader-tool.

    This is more of a "cache-buster" by adding a version stamp to the URL.

    Just passing along my observation.
    .

    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
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,530
    Plugin Contributions
    80

    Default Re: File Auto-Versioning [Support Thread]

    Quote Originally Posted by DrByte View Post
    Agreed. I was looking at it from the perspective of someone looking at a list of plugins and trying to understand what they do by their name, and deciding whether they might need to install it on their shop. It felt like "file versioning" might imply "managing versions of every file in my Zen Cart", thus maybe more of an upgrader-tool.

    This is more of a "cache-buster" by adding a version stamp to the URL.

    Just passing along my observation.
    I agree with Dr Bytes assumption. When I saw this thread I thought it updates the version number in PHP files. I'd go a little beyond and say Browser Asset Auto Versioning.

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,574
    Plugin Contributions
    1

    Default Re: File Auto-Versioning [Support Thread]

    Module not yet available so I cannot find out details but here is my question.

    stylesheet.1194900443.css <- is this similar to what the filename will look like using the module?

    If yes, perhaps "Filename Revisioning" would be more applicable as a Module name?

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    10,732
    Plugin Contributions
    79

    Default Re: File Auto-Versioning [Support Thread]

    The plugin (see its GitHub repository for the current readme) doesn't actually modify any files, it simply generates an HTML attribute containing the file's last-modified time (e.g. stylesheet.css&293729837) to "trick" the browser into grabbing the updated file's contents.

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    10,732
    Plugin Contributions
    79

    Default Re: File Auto-Versioning [Support Thread]

    Quote Originally Posted by DrByte View Post
    Agreed. I was looking at it from the perspective of someone looking at a list of plugins and trying to understand what they do by their name, and deciding whether they might need to install it on their shop. It felt like "file versioning" might imply "managing versions of every file in my Zen Cart", thus maybe more of an upgrader-tool.

    This is more of a "cache-buster" by adding a version stamp to the URL.

    Just passing along my observation.
    Quote Originally Posted by numinix View Post
    I agree with Dr Bytes assumption. When I saw this thread I thought it updates the version number in PHP files. I'd go a little beyond and say Browser Asset Auto Versioning.
    Thanks, guys, I'll go with @numinix's "a little beyond" as it fully describes the plugin's function. I'll get that name changed for the next go-round.

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    10,732
    Plugin Contributions
    79

    Default Re: File Auto-Versioning [Support Thread]

    Quote Originally Posted by lat9 View Post
    Here's the link for the Zen Cart Plugins download (once reviewed): https://www.zen-cart.com/downloads.php?do=file&id=2116
    v1.0.0 is now available for download.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Auto Store Open/Close (ASOC) - [Support Thread]
    By frank18 in forum All Other Contributions/Addons
    Replies: 14
    Last Post: 15 May 2018, 09:05 PM
  2. v150 Product Images on Invoice, Email, etc [Support Thread]
    By jackie.taferner in forum All Other Contributions/Addons
    Replies: 28
    Last Post: 8 Jan 2018, 03:57 PM
  3. [Support Thread] Transcendence Series (Admin Templates)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 70
    Last Post: 22 Jul 2016, 08:37 PM
  4. v150 CSS Buttons for Admin [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 19
    Last Post: 24 Dec 2015, 09:13 PM
  5. v151 Flower Templates Support Thread
    By creamcrackers in forum Addon Templates
    Replies: 1
    Last Post: 25 Jun 2013, 09:12 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR