'.htaccess do not preload files on Ajax calls
I have some website running with PHP. In my .htaccess I have added the following directives:
<FilesMatch "index.php">
Header add Link "</css/bootstrap.min.css>; rel=preload; as=style"
</FilesMatch>
The websites main content is solely called via the index.php, like this https://somedomain.com or https://somedomain.com/?feature=a.
Within the website I am using Ajax to call further data, from URIs like https://somedomain.com/ajax.php?load=this.
Recently Google Chrome started throwing warnings in the dev console with every Ajax call that is done, like that:
The resource was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate
asvalue and it is preloaded intentionally.
Is that a bug in Chrome or is there something wrong with my .htaccess?
Thank you.
Solution 1:[1]
Seems like the issue was a bug in Google Chrome. Since today Chrome doesn't throw the warning anymore.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Thommy Tomka |
