After updating to Wordpress 4.7, the WordPress load-scripts.php is producing the following result. We are unable to identify the cause of this.

enter image description here

enter image description here

  • please provide your PHP version? – prosti Jan 2 '17 at 22:27
  • The server is running PHP 7.0.14 – Rohith Jan 2 '17 at 22:28
  • Are you running this on Windows, and what Browser, please? – prosti Jan 2 '17 at 22:30
  • It's a linux server and All browsers have the same issue – Rohith Jan 2 '17 at 22:35
  • Do you get any web server errors when you create the request ? I think the problem you have is on Apache side. – prosti Jan 2 '17 at 23:11

Can you provide the request header you get in your browser? It should follow this form:

File: load-scripts.php
56: header("Etag: $wp_version");
57: header('Content-Type: application/javascript; charset=UTF-8');
58: header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
59: header("Cache-Control: public, max-age=$expires_offset");

The request header is OK. I can confirm I saw similar problems on SO, and these were solved via clearing the cache or opening the site in incognito Browser. I don't understand this problem so I need level up. Anyone?

Another strange thing that I noticed was when I've changed the version value from the get query, the issue is gone but it came again when I've refreshed the browser. i.imgur.com/Jj0dqwc.gif

This looks like the caching problem. Caching in WordPress may affect you on:

  1. Web browser lever
  2. WordPress application level
  3. Web server software or some proxy level

Typically the web server level you control via the .htaccess file, or web server config instructions

WordPress application level you control with some plugins you installed

And Web server software or some proxy level is based on what helper caching applications you installed on your Web Server.

For 2. and 3. you will certainly have the refresh option. Since when you alter the numbers at the end you the problem is gone, it is obvious this is a caching problem.

| improve this answer | |
  • I have updated the question. – Rohith Jan 2 '17 at 22:54
  • You can open your page in incognito and let me know if this helps? – prosti Jan 2 '17 at 23:37
  • I have tried it in incognito, but still we are having the same result. We are having issue similar to stackoverflow.com/questions/11916987/… Tried all the answers from that question but still same result. – Rohith Jan 3 '17 at 12:15
  • @Soumith, have you tried to restart Apache, and please let me know the other feedback I requested. We haven't had something similar on wpso. – prosti Jan 3 '17 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.