Opened 15 years ago
Closed 15 years ago
#17272 closed defect (bug) (invalid)
'ver' parameter included by default in wp_enqueue_script
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.1 |
| Component: | General | Keywords: | reporter-feedback close |
| Focuses: | 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)
#3
in reply to:
↑ 1
@
15 years ago
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.
Note: See
TracTickets for help on using
tickets.
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.