Tarun Posted October 31, 2016 Author Posted October 31, 2016 Your forum root would be the /forums directory. Just like how here the address is invisionpower.com/forums - you'd put it in that forum folder. No, there's no difference in now/access. They are quite literally the same thing. See Caching Directive bases.
marklcfc Posted October 31, 2016 Posted October 31, 2016 Ok. Since upgrading I have been using this FileETag None <IfModule mod_deflate.c> <filesMatch ".(css|js|x?html?|php)$"> SetOutputFilter DEFLATE </filesMatch> </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresDefault "now plus 1 week" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 month" ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 week" ExpiresByType application/javascript "access plus 1 week" ExpiresByType application/x-javascript "access plus 1 week" ExpiresByType application/x-shockwave-flash "access plus 1 week" ExpiresByType video/x-flv "access plus 1 week" ExpiresByType application/pdf "access plus 1 week" ExpiresByType text/xml "access plus 1 month" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType application/font-woff "access plus 1 month" ExpiresByType application/x-font-woff "access plus 1 month" ExpiresByType font/woff "access plus 1 month" ExpiresByType application/font-woff2 "access plus 1 year" ExpiresByType application/vnd.ms-fontobject "access plus 1 month" ExpiresByType application/x-font-ttf "access plus 1 month" ExpiresByType font/opentype "access plus 1 month" ExpiresByType image/svg+xml "access plus 1 month" </IfModule> Is there any benefit in swapping this for your code? I only ask due to lack of knowledge
Tarun Posted November 1, 2016 Author Posted November 1, 2016 I'd suggest making a backup of your current one, uploading the one on the marketplace and testing it on GTMetrix.
marklcfc Posted November 24, 2016 Posted November 24, 2016 (edited) These expires (not just yours, in general) create an issue with opcache, I and many of my members appear to be logged out and are not seeing updated topics (we're not, needs a page refresh to show as logged in and show the latest topic list). This only happens when opcache is enabled, so it is clashing somewhere. In which case, how do I have working image expires when I have opcache active? Edited November 24, 2016 by marklcfc
marklcfc Posted November 24, 2016 Posted November 24, 2016 (edited) It seems to be ExpiresDefault "now plus 1 hour" that is the problem when opcache is active, it messes things up. Am I ok to remove that or does it defeat the object? As it works fine when that line isn't there. Edited November 24, 2016 by marklcfc
Tarun Posted November 24, 2016 Author Posted November 24, 2016 Yes, you can safely remove or alter the time on those lines as you see fit.
Sean James Posted June 21, 2017 Posted June 21, 2017 Thanks for this code I will test it out today, there shouldnt be any issues with v4.1.19.4? And just to confirm I just add this code to my /forums/ directory?
Tarun Posted June 22, 2017 Author Posted June 22, 2017 Works fine with IPS Forums 4.1.x. Yes, just add into your /forums/ directory. If you have any issues let me know.
Tarun Posted July 27, 2017 Author Posted July 27, 2017 For any wondering, this works just fine with 4.2.x.
gavpedz Posted July 31, 2017 Posted July 31, 2017 (edited) I have just started using this one which i found on another site. Any suggestions with this one considering i have also just started using http2? <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 1 month" # DATA ExpiresByType text/xml "access plus 0 seconds" ExpiresByType text/html "access plus 0 seconds" ExpiresByType text/plain "access plus 0 seconds" ExpiresByType application/xml "access plus 0 seconds" ExpiresByType application/json "access plus 0 seconds" ExpiresByType application/rss+xml "access plus 1 hour" ExpiresByType application/atom+xml "access plus 1 hour" ExpiresByType text/x-component "access plus 1 hour" # MANIFEST ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" ExpiresByType text/cache-manifest "access plus 0 seconds" # SCRIPTS ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" ExpiresByType application/x-javascript "access plus 1 month" # IMAGES ExpiresByType image/gif "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType image/jpe "access plus 1 month" ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/jp2 "access plus 1 month" ExpiresByType image/pipeg "access plus 1 month" ExpiresByType image/bmp "access plus 1 month" ExpiresByType image/tiff "access plus 1 month" ExpiresByType image/svg+xml "access plus 1 month" ExpiresByType image/vnd.microsoft.icon "access plus 1 month" # ICONS ExpiresByType image/ico "access plus 1 month" ExpiresByType image/icon "access plus 1 month" ExpiresByType text/ico "access plus 1 month" ExpiresByType image/x-ico "access plus 1 month" ExpiresByType image/x-icon "access plus 1 month" ExpiresByType application/ico "access plus 1 month" # AUDIO ExpiresByType audio/ogg "access plus 1 month" ExpiresByType audio/basic "access plus 1 month" ExpiresByType audio/mid "access plus 1 month" ExpiresByType audio/midi "access plus 1 month" ExpiresByType audio/mpeg "access plus 1 month" ExpiresByType audio/x-aiff "access plus 1 month" ExpiresByType audio/x-mpegurl "access plus 1 month" ExpiresByType audio/x-pn-realaudio "access plus 1 month" ExpiresByType audio/x-wav "access plus 1 month" # VIDEO ExpiresByType video/ogg "access plus 1 month" ExpiresByType video/mp4 "access plus 1 month" ExpiresByType video/webm "access plus 1 month" ExpiresByType video/x-msvideo "access plus 1 month" ExpiresByType video/mpeg "access plus 1 month" ExpiresByType video/quicktime "access plus 1 month" ExpiresByType video/x-la-asf "access plus 1 month" ExpiresByType video/x-ms-asf "access plus 1 month" ExpiresByType x-world/x-vrml "access plus 1 month" # FONTS ExpiresByType font/truetype "access plus 1 month" ExpiresByType font/opentype "access plus 1 month" ExpiresByType application/x-font-ttf "access plus 1 month" ExpiresByType application/x-font-woff "access plus 1 month" ExpiresByType application/font-woff "access plus 1 month" ExpiresByType application/vnd.ms-fontobject "access plus 1 month" # FLASH ExpiresByType application/x-shockwave-flash "access plus 1 month" ExpiresByType video/x-flv "access plus 1 month" # OTHERS ExpiresByType application/pdf "access plus 1 month" ExpiresByType image/vnd.wap.wbmp "access plus 1 month" ExpiresByType application/vnd.wap.wbxml "access plus 1 month" ExpiresByType application/smil "access plus 1 month" <IfModule mod_headers.c> Header append Cache-Control "public" </IfModule> </IfModule> Edited July 31, 2017 by gavpedz
Tarun Posted April 22, 2018 Author Posted April 22, 2018 No updates have actually been made. I've simply checked the generated IPS 4.3 .htaccess for changes. The file is fully 4.3 compatible. kysil 1
Tarun Posted May 10, 2018 Author Posted May 10, 2018 @priyesh.mehta94@gmail.com this was designed with focus on Apache.
Tarun Posted February 27, 2019 Author Posted February 27, 2019 No updates have actually been made. I've simply checked the generated IPS 4.4 .htaccess for changes. The file is fully 4.4 compatible.
Tarun Posted March 7, 2019 Author Posted March 7, 2019 Just a friendly reminder and clarification. I only offer support here in this thread for the htaccess instead of via PM. This is because if someone else has the same issues, Instead of having someone who may search for the answer and not be able to find it because it was done via PM. I want that information to be publicly available and allow for quick resolutions for those who may encounter similar issues. Thanks
Tarun Posted August 20, 2020 Author Posted August 20, 2020 There are no changes to this new version, only marking compatibility with 4.5.x.
Tarun Posted September 29, 2020 Author Posted September 29, 2020 Unfortunately this file where I flagged that it's compatible with the 4.5 release is being rejected. 😞 There have been no changes to the htaccess since June 15, 2016. The only thing that has is simply marking the compatibility with the 4.5 release of the forums. I'm working to see if I can resolve this issue.
Tarun Posted October 14, 2020 Author Posted October 14, 2020 This has been resolved. No actual updates or changes have been made to the htaccess.
CyanideBurial Posted July 28, 2021 Posted July 28, 2021 Just a quick suggestion for anyone who uses cloudflare or another CDN, dont use this .htaccess it will cause conflict and your site performance will drop dramatically! i tested it against the standard htaccess and perfermonce went from 93 down to 65.
Tarun Posted August 22, 2021 Author Posted August 22, 2021 On 7/28/2021 at 3:52 PM, CyanideBurial said: Just a quick suggestion for anyone who uses cloudflare or another CDN, dont use this .htaccess it will cause conflict and your site performance will drop dramatically! i tested it against the standard htaccess and perfermonce went from 93 down to 65. It'd be great if you could mention what lines are causing the issue/conflict.
Tarun Posted November 3, 2021 Author Posted November 3, 2021 This file is not effected by the SEO changes, in case anyone is wondering. sobrenome and PPlanet 1 1
sobrenome Posted November 24, 2022 Posted November 24, 2022 Caching JS is causing issues with CKeditor not loading properly, it needs a reload on browser. Anyone experiencing this? I noticed on this community that "/applications/core/interface/ckeditor/ckeditor/config.js" must load every time and should not be cached. Am I correct?
Randy Calvert Posted November 24, 2022 Posted November 24, 2022 (edited) Typically I've only seen that issue when using Rocket loader in Cloudflare. IPS does not set a cache control header on the file, so Cloudfront does not cache it. Cloudfront is literally checking ONLY the headers to determine cachability. Cloudflare is different in that it try to intelligently determine what is catchable. With that being said... I don't think cache status is your problem. It appearing only on a reload is not a cache issue. Per CF's docs: Quote Rocket Loader prioritizes your website’s content (text, images, fonts, and more) by deferring the loading of all of your JavaScript until after rendering. This type of loading (known as asynchronous loading) leads to earlier rendering of your page content. Rocket Loader handles both inline and external scripts, while maintaining order of execution. Cloudflare will detect incompatible browsers and disable Rocket Loader. I would try checking to see if you have Rocket loader enabled and if so, disable it. My guess is that is your problem and why a reload fixes your problem because other objects are loaded into the browser cache and therefore are not impacted by Rocket Loader on the subsequent reload of the page. Once disabled, flush cache in CF, dump your browser cache, and try again. By the way... not sure I understand why you posted your question in this year old thread that does not seem to be related? Edited November 24, 2022 by Randy Calvert sobrenome 1
sobrenome Posted November 30, 2022 Posted November 30, 2022 On 11/24/2022 at 4:05 AM, Randy Calvert said: By the way... not sure I understand why you posted your question in this year old thread that does not seem to be related? I was setting the caching directives for Apache, so I found this topic. My community is not using Cloudflare, but Cloudfront. I still could not realize how to set the caching on the CDN and on the browser to make config.js loads every time.
Grafidea Posted February 9, 2023 Posted February 9, 2023 On 5/11/2015 at 1:16 AM, Tarun said: This is a custom .htaccess to use on the IPS Community Suite Forums. It helps to improve your forums Google Page Speed and YSlow scores. The top segment is the same .htaccess that is generated by the IPS Forum software. The bottom segment is based upon research of several websites and the references listed below. Please be careful when using this file because the contents may be incompatible with your server setup. Preventative measures have been taken to ensure that it should be safe to use in any Apache based environment. Google recommends a minimum of one week: https://developers.google.com/speed/docs/insights/LeverageBrowserCaching GTmetrix recommends a minimum of one month: http://gtmetrix.com/leverage-browser-caching.html This file is provided as-is and works with Apache based systems only. Server configurations may vary and there may be unexpected results, preventative measures have been included to try and keep any problems from occurring. This resource is not supported. Help will be offered to the best of my ability and the community's help and feedback are welcomed. Contributions to improve the overall performance gained by this file are encouraged. Hi please reupload file. Thanks
Recommended Posts