Find Answers and Get Support › Forums › Cera – Intranet & Community Theme › Fine Tuning › Performance Optimization › Missing Source Map files create unnecessary server load
- This topic has 4 replies, 2 voices, and was last updated 4 years, 11 months ago by
Themosaurusrex.
-
AuthorPosts
-
SamParticipant@sjregan
- 18 Topics
- 41 Posts
Throughout cera theme and grimlock plugins the CSS and JS files contain references to source maps. (eg: /*# sourceMappingURL=customizer-preview.css.map */)
However the source maps are missing. This means that the WordPress 404 handler is running for each missing source map, creating unnecessary server load.
On a basic home page, there are at least 7 missing files, this means 7 additional PHP processes and countless database calls for requests that are never seen by the user.
Additionally, if browsers limit the number of parallel requests then legitimate requests are delayed waiting for the pointless 404 responses.
Please either include the files, or strip the references.
May 1, 2020 at 02:24 #12254@themosaurusrex- 0 Topics
- 2048 Posts
Hi @sjregan,
Thank you for your feedback.
We’re aware of this issue and we’re planning on removing this references from our files. This will be fixed in the coming updates.
However, these warnings should not cause any issue, unless you have your browser debugging tools activated. A quick test using Charles Web Proxy (https://www.charlesproxy.com/) shows that source maps are only loaded if developer tools are opened. If you load a page without dev tools opened, there is no http request for source maps.
For more about this, please read also the following post:
https://blog.praveen.science/avoiding-http-404-for-map-files-when-using-minified-css/Best,
May 2, 2020 at 07:48 #12309SamParticipant@sjregan- 18 Topics
- 41 Posts
@themosaurusrex Thank you for the detailed reply.
As I spend my time developing plugins and extending your theme I always have my developer tools open, so my underpowered laptop and I will be thankful when this release happens 🙂
For anyone else who finds this thread before the release, I used this to reduce the server load in my nginx hosts file:
location ~ \.map$ {return 200;}
May 2, 2020 at 08:09 #12310 -
AuthorPosts
Hi there,
This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!
Best regards,
The Themosaurus team.
The topic ‘Missing Source Map files create unnecessary server load’ is closed to new replies.