As the Codex tells us you can add another parameter to the function that holds the version number.
wp_register_script( $handle, $src, $deps, $ver, $in_footer );
$ver
String specifying the script version number, if it has one, which is concatenated to the end of the path as a query string. If no version is specified or set to false, then WordPress automatically adds a version number equal to the current version of WordPress you are running. If set to null no version is added. This parameter is used to ensure that the correct version is sent to the client regardless of caching, and so should be included if a version number is available and makes sense for the script.
So if you add a string, like 1.2.3
as fourth parameter, this is added to the end of your registered javascript file.
Related Posts:
- addEventListener vs onclick
- Understanding unique keys for array children in React.js
- (Google Map API) Geocode was not successful for the following reason: REQUEST_DENIED
- Generate random number between two numbers in JavaScript
- Difference between npx and npm?
- How do I copy to the clipboard in JavaScript?
- Array of JSON Objects
- Cannot read property ‘push’ of undefined when combining arrays
- window.onload vs document.onload
- Fetch: POST JSON data
- JavaScript hide/show element
- Copy array by value
- How to call an async arrow function with await
- Get the current URL with JavaScript?
- How do I empty an array in JavaScript?
- What’s the difference between event.stopPropagation and event.preventDefault?
- ReferenceError: fetch is not defined
- Firebase Permission Denied
- Using Javascript in CSS
- How can I mock an ES6 module import using Jest?
- What is “assert” in JavaScript?
- How does the data-toggle attribute work? (What’s its API?)
- How to import image (.svg, .png ) in a React Component
- How do I embed PHP code in JavaScript?
- Make javascript alert Yes/No Instead of Ok/Cancel
- SyntaxError: Cannot use import statement outside a module
- Appending to an object
- What is the meaning of “$” sign in JavaScript
- How to determine the installed webpack version
- Error: Failed to execute ‘appendChild’ on ‘Node’: parameter 1 is not of type ‘Node’
- How to validate date with format “mm/dd/yyyy” in JavaScript?
- How to handle the `onKeyPress` event in ReactJS?
- ES6: Create Strings using Template Literals – Freecodecamp
- node-request – Getting error “SSL23_GET_SERVER_HELLO:unknown protocol”
- React.js – Can’t read property of undefined
- SyntaxError: import declarations may only appear at top level of a module
- Jest TypeError: Path must be a string. Received undefined
- How do I convert an integer to binary in JavaScript?
- For loop for HTMLCollection elements
- Refresh/reload the content in Div using jquery/ajax
- How to take keyboard input in JavaScript?
- Convert CSV data into JSON format using Javascript
- Can not solve: Geocode was not successful for the following reason: OVER_QUERY_LIMIT
- SyntaxError: Use of const in strict mode
- d3 is not defined – ReferenceError
- How can I get form data with JavaScript/jQuery?
- How do I load an HTML page in a div using JavaScript?
- Check time difference in Javascript
- ReactJS – .JS vs .JSX
- How to convert date to timestamp?
- ReactJS: Maximum update depth exceeded error
- React, Uncaught ReferenceError: ReactDOM is not defined
- Strip all non-numeric characters from string in JavaScript
- Javascript – Track mouse position
- Finding the max value of an attribute in an array of objects
- How to initialize an array’s length in JavaScript?
- How to set text color for my d3 chart title?
- Defining a HTML template to append using JQuery
- How do I bind to list of checkbox values with AngularJS?
- Wildcard string comparison in Javascript
- Adding javascript to child theme
- What does l10n.js do in WordPress 3.1? And how do I remove it?
- How to add javascript just before the closing body tag in the footer of WordPress
- Open media frame and select an attachment
- wp_localize_script with boolean and init
- Loading Javascript Only When Specific Content Existing in a Post?
- How to pre-fill Google Forms URLs with logged-in WordPress user’s data
- Use of Javascript with Dojo/Dijit on a WordPress page
- WordPress loads whole jQuery UI library
- Javascript that will execute on only child pages of a specific parent
- What is the Javascript event for an item being added to the cart in Woocommerce?
- How do I embed a Javascript form directly into a page?
- Can the index.asset.php file be used with the enqueue_block_editor_assets action?
- Using wp.data.select get actual tags (not id’s) used in post
- JavaScript && operator in visual editor
- How to deal with the confliction between PHP-Markdown and MathJax?
- Programatically update posts in database from one block to another using transform
- Mouse wheel Auto scroll to anchor [closed]
- Adding inline JavaScript encoding issue
- a child theme not de-registering a patent javascript file
- Custom Gutenberg-Block esnext pass variables
- How to read inline-CSS from Gutenberg block?
- javascript not loading
- Using javascript on my site to create nested tabs
- How does WP determine the difference between a post and a page url
- creating a static HTML/JS/PHP page
- Linking wp_enqueue can’t find the javascript file (adds “?ver=x.x.x” to the src)
- My code will not execute in wordpress, even though I’ve been told the code is fine
- Gutenberg – dynamically created element: how to set onChange?
- JSX SVG Icon with WordPress
- Javascript working on jsfiddle but not wordpress site?
- Drodown list return issue
- Can I just insert JavaScript by using ?
- Gutenberg Edit Block Inspector Controls and save
- JavaScript and Google PageSpeed + wp_enqueue_script
- Put dynamic Javascript in header after doing operations
- Adding javascript blocks to a single file and adding it to the header
- How to integrate a different (JavaScript) editor in WordPress?
- Add Javascript/Html into a WordPress
- How can I look at/edit what’s being sent to post.php when I hit the publish/update button?