Opened 2 years ago
Closed 2 years ago
#17272 closed defect (bug) (invalid)
'ver' parameter included by default in wp_enqueue_script
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.1 |
| Severity: | normal | Keywords: | reporter-feedback close |
| Cc: |
Description
When you register and enqueue your script, the 'ver' parameter is included by default, thus resulting in script load error. Of course, you can call wp_enqueue_script like this wp_enqueue_script('mblog',plugins_url().'/mblog/mblog.js',false,null);
and it works fine, but I don't see the point of including 'ver=3.1.2' with every script.
Change History (4)
- Keywords reporter-feedback close added; needs-patch removed
Replying to sivel:
Perhaps you could shed some light on how it results in a "script load error". The ver query var is used for cache busting primarily, so that filenames do not need to include the version for cache busting. Not including it can cause issues with core/plugin/theme upgrades.
Well, ok. just used the technique in inappropriate way.

Perhaps you could shed some light on how it results in a "script load error". The ver query var is used for cache busting primarily, so that filenames do not need to include the version for cache busting. Not including it can cause issues with core/plugin/theme upgrades.