WordPress load-scripts.php encoding issue

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.

Leave a Comment