Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#17272 closed defect (bug) (invalid)

'ver' parameter included by default in wp_enqueue_script

Reported by: nordvind's profile Nordvind 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)

#1 follow-up: @sivel
13 years ago

  • Keywords reporter-feedback close added; needs-patch removed

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.

#2 @kawauso
13 years ago

Related: #16699

#3 in reply to: ↑ 1 @Nordvind
13 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.

#4 @dd32
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

invalid; due to it being the expected behaviour

Note: See TracTickets for help on using tickets.