• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • Google PageSpeed breaks attachments

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Google PageSpeed breaks attachments

    • Issue Tools
      • View Changes
    1. issueid=3953 August 24, 2014 4:14 PM
      CarlaBirch CarlaBirch is offline
      New Member
      Google PageSpeed breaks attachments

      Hi,

      My server makes use of google page speed, to cache and compress images, people is when you first upload the image it shows fine, when you reload the page it breaks the images.

      the html shows this after a page reload:
      <img class="vw-img-image" src="data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="

      you will see the image path has been removed from the src.
    Issue Details
    Issue Number 3953
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category BB-Code Parsing
    Status Fixed
    Priority 5 - Minor Bugs / Small Tweaks
    Affected Version 4.0.0 RC 2
    Fixed Version (none)
    Milestone VaultWiki 4.0 Gold
    Software DependencyXenForo 1.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags attachments




    1. August 24, 2014 4:34 PM
      CarlaBirch CarlaBirch is offline
      New Member
      For a quick fix, you can add the following to the domains root .htaccess file.

      <IfModule pagespeed_module>
      ModPagespeedDisallow */wiki_index-asset/*
      </IfModule>
      Reply Reply  
    2. August 24, 2014 10:29 PM
      pegasus pegasus is offline
      VaultWiki Team
      In general, Pagespeed should not be used to cache any attachment content that is served dynamically via a PHP script. These resources tend to return different output based on the user's permissions. If the current visitor has different permissions than when it was cached, or if the pagespeed process is treated as a guest and guests don't have permission, then you can have issues like you experienced.

      The only way to fix this is to configure PageSpeed to ignore wiki assets, as you have figured out. For the next release, we can make the asset script return a special header that makes pagespeed ignore it.
      Reply Reply  
    3. August 26, 2014 6:21 PM
      pegasus pegasus is offline
      VaultWiki Team
      no-transform added to the Cache-Control headers for Asset and Image controllers. Marked as fixed in the next release.
      Reply Reply  
    4. September 7, 2021 10:41 AM
      mazzly mazzly is offline
      Junior Member
      Quote Originally Posted by pegasus
      no-transform added to the Cache-Control headers for Asset and Image controllers. Marked as fixed in the next release.
      Would it be possible to get that header optional?

      We were looking way too long into why the /wiki-assets/ weren't optimized by the pagespeed module, and it turned out to be because the Cache-Control header is set with "private" and "no-transform"

      In our case the images/wikis are all public anyway so doesn't matter about permissions.. Also, couldn't VW check if the image is public or not before adding those in that case?

      Anyway an option to disable that header for pagespeed compatibility would be nice
      Reply Reply  
    5. October 16, 2021 3:17 AM
      mazzly mazzly is offline
      Junior Member
      Pinging you here @pegasus
      Reply Reply  
    6. October 16, 2021 11:34 AM
      pegasus pegasus is offline
      VaultWiki Team
      This request was deferred to a later date, because of the ramifications of removing no-transform that require careful consideration: If a user's permissions ever change for any reason, their access to pagespeed-cached assets would not change, which raises a security vulnerability.

      It seems the best solution to this problem, when a pagespeed support option is enabled, would be to decrease the Expires header to 5 minutes and to remove the no-transform header, but to only apply these changes when the user viewing the asset is a guest. But this requires that pagespeed is aware whether the user is a guest, is able to use that information, and is able to pass that information to VaultWiki. It is not entirely clear to me yet from pagespeed's documentation how it handles user sessions and user cookies.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 2:42 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.