[wp-trac] [WordPress Trac] #58433: WP version in Etag header in load-styles.php file

WordPress Trac noreply at wordpress.org
Wed Jun 14 00:50:03 UTC 2023


#58433: WP version in Etag header in load-styles.php file
-------------------------------------------------+-------------------------
 Reporter:  dav4                                 |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  needs-testing-info has-patch needs-  |     Focuses:
  testing                                        |
-------------------------------------------------+-------------------------

Comment (by peterwilsoncc):

 In the recent test meeting in slack, there was a question about the poc
 suffix on [attachment:"58433-poc.diff"]. It's to indicate it's a proof of
 concept.

 I've designated it as such as an equivalent change would be required in
 `wp-includes/load-styles.php` prior to commit. If the concept is proven as
 workable for loading scripts, then I will follow up with a patch that
 covers loading styles too.

 Steps to test:

 1. Apply the patch to your development environment
 1. Visit the dashboard of your development environment.
 1. Open the developer tools in your browser, switch to the network tab.
 1. Look for a URL that contains `load-scripts.php`
 1. Click on the URL, this should open a panel with further details
 1. The panel will show a section called "Response Headers" or similar
 1. Look for the header `ETAG`, it should show an apparently random string
 made up of 0-9A-F
 1. Look for a second URL that contains `load-scripts.php`
 1. Follow the steps above to look for the `ETAG` header
 1. Confirm the ETAG header differs from the first URL's

 Advanced testing
 1. Look for a URL containing both `load-scripts.php` and `jquery`
 1. Observe the ETAG header following the steps anove
 1. Change the version number of jQuery as registered on line 825 of
 `script-loader.php`
 1. Reload the page in your browser
 1. Look for the same URL
 1. Confirm the ETAG header has changed from the initial version

 @ironprogrammer let me know if these steps help or you think they need
 clarifying.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58433#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list