Pratham
Forum Replies Created
-
Forum: Plugins
In reply to: [W3 Total Cache] How to set a lower browser cache time than page cache time?@vmarko Gentle reminder
Forum: Plugins
In reply to: [Product Size Charts Plugin for WooCommerce] MySQL 8 – RLIKE errorDoes it make sense to make the following replacement?
'value' => "[[:<:]]{$product_term}[[:>:]]",
with
'value' => "\\b{$product_term}\\b",Cool that this filter already exists, thanks!
Forum: Plugins
In reply to: [Super Progressive Web Apps] How to delay the Add to homescreen popup?Thanks, Arun. Looking forward to it. This would help a bit with the Largest Contentful Paint issues on small mobile devices.
Forum: Plugins
In reply to: [W3 Total Cache] How to set a lower browser cache time than page cache time?Hi Marko,
Thanks for the reply.
Sorry for the confusion but by ‘server-side page cache’ I mean W3TC Page Cache itself (enhanced mode).How do we have a page cache for a longer duration in W3TC but lower cache time in Cache-Control headers which affect the client-side cache (i.e. browser cache)?
From my understanding both Page Cache time and Browser’s Cache-Control header expire time are currently controlled by the option โSet expires headerโ in Performance>Browser Cache>HTML&XML.
Cool, I have another relevant question if it is an API.
Is the API standalone (independent of WordPress?) because some WordPress installations have a high initialization time per request (since the plugins & themes are loaded and calling this API per request or visitor would then lead to a bottleneck.Another off topic query, I actually stumbled upon Cookiedatabase.org. Is there a dependency on their paid API?
Forum: Plugins
In reply to: [Plugin Organizer] Errors with latest WP versionDefining these in wp-config.php doesn’t make sense.
It checks for
$_SERVER['HTTP_HOST']which doesn’t exist in a CLI environment. (I’m assuming these notices occur when running a cron via php cli / wp-cli commands)Plugin developer should check if the $_SERVER[‘HTTP_HOST’] is set before using it.
if(isset($_SERVER['HTTP_HOST'])) { ... }- This reply was modified 6 years, 2 months ago by Pratham.
Forum: Plugins
In reply to: [Autoptimize] Network Drive? (AWS EFS)Can you briefly let me know how the file names are generated? I’m assuming it to be a hash of the content. So they would be same across two different servers as long as the css/js output is same, correct?
I found some more info here.
https://stackoverflow.com/questions/3832646/what-happens-in-nfs-if-2-or-more-servers-try-to-write-the-same-file-simultaneousIf you open the file in “write” mode (say you wanted to add content to the middle) then you actually have to lock the file to do this. The second PHP script will throw an error saying that it couldn’t open the file.
Does this exception need to be handled?
Yes, please do.
Another plugin has addressed a similar issue.
Ref: https://wordpress.org/support/topic/get_page_templates-consumes-too-much-io-for-each-page-request/Thanks for the support!
Forum: Plugins
In reply to: [a3 Lazy Load] Cumulative Layout ShiftI had already asked about adding a filter to handle the reflow issue (layout shift) long time ago but it went unnoticed.
The proposed solution is mentioned there, this could be built into the plugin itself now that google page speed insights prioritises this. WP Lazy Load with CLS would be great for marketing this time ๐
https://wordpress.org/support/topic/improvement-prevent-reflow/
- This reply was modified 6 years, 2 months ago by Pratham.
Cool! thanks for replying soon ๐
I’ve created a PR with some modifications, please review these changes.
https://github.com/futtta/autoptimize/pull/326I noticed you had registered an action while clearing autoptimize cache:
autoptimize_action_cachepurged.I have added code to delete the transient when the above action is triggered.
- This reply was modified 6 years, 2 months ago by Pratham.
Forum: Plugins
In reply to: [a3 Lazy Load] Improvement: Prevent reflowSadly the
a3_lazy_load_placeholder_urlfilter does not allow overriding the placeholder for a specific image tag.Other option is see is the
a3_lazy_load_html_afterfilter.add_filter( 'a3_lazy_load_html_after', function($content){ // Parse and modify the img tag here return $content; });If you could create a new filter which allows overriding the placeholder URL per image tag and passes the matched image tag to the handler, it would be great ๐
- This reply was modified 6 years, 4 months ago by Pratham.
Forum: Plugins
In reply to: [a3 Lazy Load] Image Lazy LoadCan you please post the link to your website? It will be needed most likely in order to see the problem.
Forum: Plugins
In reply to: [AWS for WordPress] Trying to get property ‘ID’ of non-objectOne more issue I spotted.
Regarding the BackgroundTask class where the current set of cookies are passed to an internal HTTP request. In my case that internal request ends up in a 403 Forbidden error.
"POST /wp-admin/admin-post.php HTTP/1.1" 403This might be specific to my server setup so let me evaluate this and get back.
Update 1: This was an issue specific to our setup. After fixing this the audio file is being generated.
A slightly off-topic question.. Can this type of implementation where cookies are being routed can cause issues where the current authenticated session is limited to a specific client IP?
- This reply was modified 6 years, 4 months ago by Pratham.
Forum: Plugins
In reply to: [AWS for WordPress] Does it works with custom post types?Hi Antonio,
There is a setting under AWS in Text-to-Speech submenu labeled Post types. This is only visible after entering valid credentials in General settings.
The plugin also provides a
amazon_polly_post_typesfilter to modify the post_type support.This is also documented in the README.md file along with other filters.
PROTIP: Use
grep(linux command) or Find in Files feature in Visual Studio Code to find allapply_filtersordo_actioncalls when you are exploring new plugins.- This reply was modified 6 years, 4 months ago by Pratham.