Does a ` with a non-matching media value download sync or async, render-blocking or non-render-blocking?

I’m looking for an authoritative reference with regard to whether <link rel="stylesheet"> with a non-matching media attribute value downloads synchronously or render-blocking or neither.

MDN helpfully draws attention to Scott Jehl’s experiments from several years ago:

A style sheet with a media query attached to its tag will still download even if the query returns false.

Source: https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries

Additional Reference: http://scottjehl.github.io/CSS-Download-Tests/

So far, so good.

But is that download-which-is-happening-anyway:

  • synchronous or asynchronous ?
  • render-blocking or non-render-blocking ?

I’m going to guess that it’s asynchronous, non-render-blocking and low priority.

But I’d really like to confirm this via an authoritative source – and I’ve been unable to find one.


Background to this question:

Now that Firefox (as of Jan 2021) supports <link rel="preload"> (see: https://caniuse.com/link-rel-preload), I’ve been running some experiments to see whether I am happiest with the behaviour of:

<link rel="preload" href="/my-non-critical-styles.css" as="style" onload="this.onload=null; this.rel='stylesheet';" /> 

versus:

<link rel="stylesheet" href="/my-non-critical-styles.css" media="print" onload="this.media='all';"> 

I can see that they do behave differently – a speed/performance tool like GTMetrix shows very clearly that the rel="preload" approach prioritises loading the non-critical stylesheet over images, while the media="print" approach prioritises loading images over the non-critical stylesheet – but I also want to be certain that the two approaches are alike in all other respects.

WooCommerce sync product stock between products [closed]

In my store, we sell belts and they have a Buckle which is counted in inventory.

The thing is that two belts can have one buckle.

The buckle is a separate Variation product I made.

I was wondering if it’s possible to sync the stock between the belts that use a specific variation of the Buckle.

For example:

If buckle No. 1 is out of stock, all belt using it are automatically out of stock.

Is this possible? I’ve tried chained products, but the problem here is that they still show up in the product catalog.

Sync logins and Agent jobs across all replicas in Distributed Availability Group

I am using dba_CopyLogins stored proc to sync logins on replicas in Distributed Availability group , but the database level permissions are not transferred due to database sync operation is going on.. Is there any way to sync all logins and permissions from global primary to Forwarder and other replicas? also how to copy agent jobs?

Sync MySQL schemas bettwen diferent databases

I have a couple of databases that have the exact same structure than my "master" database, but after a couple of months, the developers did small changes (like, add another collum, change a datatype to fix an error, etc) and they forgot to replicate it overall databases.

After some research, I found out that mysqldiff could generate the queries to update the databases left behind. But since I am using MySQL 8, it doesn’t work (ERROR: Query failed. 1146 (42S02): Table ‘mysql.proc’ doesn’t exist), and the project (mysql-utilities) looks like got abandoned (the last commit is from 2016)…

Does anyone know a free alternative for mysqldiff? I just need to sync the databases, not the data. I am asking because most questions that I looked up where a little bit old.

Is it possible that my personal photos in my smartphone may end up in the internet even if I never uploaded or sync it anywhere in the internet?

Sorry if its a dumb question. I am pretty sure that my smartphone (android miui11) is constantly sending various data to its servers anytime when the internet is on. So, does it send my personal photos to the servers? Or any data related to my personal photos? Can this be a threat? Like if someone in the servers could see and upload my photos somewhere else in the internet?

Help with reviewing locking logic for sync system

I’m implementing a sync algorithm where multiple apps sync files with a data source. Syncing is already working and has been for several years so there’s no issue with this.

Now I want to implement a way to lock the data source, to tell clients that they shouldn’t write to it anymore. This will be used to upgrade the data source – i.e. upgrade its structure, move folders around, etc. which needs to be done when nothing else is syncing.

So I came up with the following algorithm, inspired by [SQLite 3 locking mechanism][1], but changed to take into account that it’s network based.

There are three types of locks, and a client request a lock by POSTing a file to the data source. The locks are:

  • SYNCING: The client is syncing – any other client can still read or write to the data source. There can be multiple SYNCING locks.
  • PENDING: The client wants to acquire an exclusive lock on the data source – any other clients can still read or write to the data source, but no new SYNCING lock can be posted. There can be multiple PENDING locks.
  • EXCLUSIVE: The client has locked the data source – no other client can read or write to it. There can be only one EXCLUSIVE lock.

And it would work like so:

  • When a client starts syncing with the data source, they acquire a SYNCING lock. When a client finishes syncing, they release the SYNCING lock they’ve created
  • When a client needs to lock the data source, it first posts a PENDING lock.¬†When a PENDING lock is present, no new SYNCING or PENDING locks can be posted. Clients that are syncing however can complete the process. The client who has acquired a PENDING lock will poll the data source and wait for all SYNCING lock to be released. When they are all gone, the client checks for all the PENDING locks – if there are others, the client checks the timestamps of these other locks and if his lock is not the oldest one, it deletes it and exit. Locking failed, and it will need to try again later.
  • If the PENDING lock is the oldest, then the client posts an EXCLUSIVE lock. At this point, no other client can post any other lock.

I’m wondering if I overlook something with this system, like I’m wondering if there could be some race conditions in some cases?

For now, I’m not dealing with clients that post a lock then crash, there will be some logic to clean up. At this point, I just want to make sure that this system will only allow one client to acquire an EXCLUSIVE lock. Any ideas?

Is it possible to sync up LMKs in two Thales PayShield 9000 instances>

Basically, when we execute a generate key command such as A0 then we receive a key-under-lmk for future use. What if we have multiple HSMs in a high availability configuration? How would we make sure that all keys-under-LMK mean the same thing to all HSM instances?

The documentation I have doesn’t cover this and I didn’t find anything online about that particular model.

Postgres replica out of sync

we have a postgres 9.6 replica configured among 2 servers. We used the following configuration to create the replica:

postgresql.conf  wal_level = hot_standby                         max_wal_senders = 5 wal_keep_segments = 32 archive_mode = on    archive_command = 'cp %p /archive/%f' 

The problem is that the servers has been restarted due to some maintenance tasks and now they are out of sync.

Since the DB is very large, how can we restore the replica and then synchronize the data without having the application down more then 5/10 minutes? Can it be done in background while the application on the master site is being used?