How to get rid of browser caching issue of javascript file in magento 2How to force flush CSS cache on client side?CSS Caching.. Where is it hiding?Live site blank in frontend or keep on loading and never loadLeverage browser caching having Varnish installedMagento 2: Reflect CSS Changes Directlymagento 1.9.3.2 doesn't load CSS and JS on frontend and backend after some intense processlocal project url redirected to live project (project url import issue)Strange (browser) caching issue in cartMagento 2 static file paths incorrect after migrationCan't recuperate the css and javascript magento 2
Intern not wearing safety equipment; how could I have handled this differently?
E12 LED light bulb flickers when OFF in candelabra
Category-theoretic treatment of diffs, patches and merging?
How did the IEC decide to create kibibytes?
Why did Robert F. Kennedy loathe Lyndon B. Johnson?
How can I use my cell phone's light as a reading light?
What was the significance of Spider-Man: Far From Home being an MCU Phase 3 film instead of a Phase 4 film?
Quotients of a ring of integers
How do resistors generate different heat if we make the current fixed and changed the voltage and resistance? Notice the flow of charge is constant
Why SQL does not use the indexed view?
Sense of humor in your sci-fi stories
Uniform initialization by tuple
Why is a mixture of two normally distributed variables only bimodal if their means differ by at least two times the common standard deviation?
Derivatives Problem: Why is second term's coefficient less than zero?
Did William Shakespeare hide things in his writings?
The Apéry's constant and the Airy function
What does "spinning upon the shoals" mean?
Can a USB hub be used to access a drive from two devices?
Why do airports remove/realign runways?
Was the 45.9°C temperature in France in June 2019 the highest ever recorded in France?
Possibility to correct pitch from digital versions of records with the hole not centered
What was the nature of the known bugs in the Space Shuttle software?
stuck on a complex number problem
Need a non-volatile memory IC with near unlimited read/write operations capability
How to get rid of browser caching issue of javascript file in magento 2
How to force flush CSS cache on client side?CSS Caching.. Where is it hiding?Live site blank in frontend or keep on loading and never loadLeverage browser caching having Varnish installedMagento 2: Reflect CSS Changes Directlymagento 1.9.3.2 doesn't load CSS and JS on frontend and backend after some intense processlocal project url redirected to live project (project url import issue)Strange (browser) caching issue in cartMagento 2 static file paths incorrect after migrationCan't recuperate the css and javascript magento 2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
After our magento 2 site is live whenever we are doing changes in JS file it doesn't reflect in customer browser as a result some of the pages breaks for those customer who doesn't flush his browser cache. Is there any way that browser will load fresh file from the server if there is any changes in the file.
Thanks in Advance
I am facing this issue in magento 2
magento2 javascript cache browser
add a comment |
After our magento 2 site is live whenever we are doing changes in JS file it doesn't reflect in customer browser as a result some of the pages breaks for those customer who doesn't flush his browser cache. Is there any way that browser will load fresh file from the server if there is any changes in the file.
Thanks in Advance
I am facing this issue in magento 2
magento2 javascript cache browser
You have tried versioning? mage2.pro/t/topic/3476
– Rizwan Khan
Jun 28 at 12:02
We can't add versioning in production site
– anjanbarik
Jun 28 at 12:06
You want to refresh only one javascript file when your js changes?
– Rizwan Khan
Jun 28 at 12:09
Anything will work.
– anjanbarik
Jun 28 at 12:19
add a comment |
After our magento 2 site is live whenever we are doing changes in JS file it doesn't reflect in customer browser as a result some of the pages breaks for those customer who doesn't flush his browser cache. Is there any way that browser will load fresh file from the server if there is any changes in the file.
Thanks in Advance
I am facing this issue in magento 2
magento2 javascript cache browser
After our magento 2 site is live whenever we are doing changes in JS file it doesn't reflect in customer browser as a result some of the pages breaks for those customer who doesn't flush his browser cache. Is there any way that browser will load fresh file from the server if there is any changes in the file.
Thanks in Advance
I am facing this issue in magento 2
magento2 javascript cache browser
magento2 javascript cache browser
edited Jun 28 at 12:05
Rizwan Khan
1,0851 gold badge7 silver badges27 bronze badges
1,0851 gold badge7 silver badges27 bronze badges
asked Jun 28 at 11:55
anjanbarikanjanbarik
164 bronze badges
164 bronze badges
You have tried versioning? mage2.pro/t/topic/3476
– Rizwan Khan
Jun 28 at 12:02
We can't add versioning in production site
– anjanbarik
Jun 28 at 12:06
You want to refresh only one javascript file when your js changes?
– Rizwan Khan
Jun 28 at 12:09
Anything will work.
– anjanbarik
Jun 28 at 12:19
add a comment |
You have tried versioning? mage2.pro/t/topic/3476
– Rizwan Khan
Jun 28 at 12:02
We can't add versioning in production site
– anjanbarik
Jun 28 at 12:06
You want to refresh only one javascript file when your js changes?
– Rizwan Khan
Jun 28 at 12:09
Anything will work.
– anjanbarik
Jun 28 at 12:19
You have tried versioning? mage2.pro/t/topic/3476
– Rizwan Khan
Jun 28 at 12:02
You have tried versioning? mage2.pro/t/topic/3476
– Rizwan Khan
Jun 28 at 12:02
We can't add versioning in production site
– anjanbarik
Jun 28 at 12:06
We can't add versioning in production site
– anjanbarik
Jun 28 at 12:06
You want to refresh only one javascript file when your js changes?
– Rizwan Khan
Jun 28 at 12:09
You want to refresh only one javascript file when your js changes?
– Rizwan Khan
Jun 28 at 12:09
Anything will work.
– anjanbarik
Jun 28 at 12:19
Anything will work.
– anjanbarik
Jun 28 at 12:19
add a comment |
1 Answer
1
active
oldest
votes
You can add a query string to your javascript file URL in order to take effect in your customer browsers. like below example.
http://yourdoamin/js/youjs.js?version=1.1
Change your version when you make changes in your js file.
http://yourdoamin/js/youjs.js?version=1.2
How you can do that in magento 2?
– anjanbarik
Jul 1 at 7:39
which js you want to take effect? is it magento default or your custom.
– Rizwan Khan
Jul 1 at 11:04
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f280084%2fhow-to-get-rid-of-browser-caching-issue-of-javascript-file-in-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can add a query string to your javascript file URL in order to take effect in your customer browsers. like below example.
http://yourdoamin/js/youjs.js?version=1.1
Change your version when you make changes in your js file.
http://yourdoamin/js/youjs.js?version=1.2
How you can do that in magento 2?
– anjanbarik
Jul 1 at 7:39
which js you want to take effect? is it magento default or your custom.
– Rizwan Khan
Jul 1 at 11:04
add a comment |
You can add a query string to your javascript file URL in order to take effect in your customer browsers. like below example.
http://yourdoamin/js/youjs.js?version=1.1
Change your version when you make changes in your js file.
http://yourdoamin/js/youjs.js?version=1.2
How you can do that in magento 2?
– anjanbarik
Jul 1 at 7:39
which js you want to take effect? is it magento default or your custom.
– Rizwan Khan
Jul 1 at 11:04
add a comment |
You can add a query string to your javascript file URL in order to take effect in your customer browsers. like below example.
http://yourdoamin/js/youjs.js?version=1.1
Change your version when you make changes in your js file.
http://yourdoamin/js/youjs.js?version=1.2
You can add a query string to your javascript file URL in order to take effect in your customer browsers. like below example.
http://yourdoamin/js/youjs.js?version=1.1
Change your version when you make changes in your js file.
http://yourdoamin/js/youjs.js?version=1.2
edited Jun 28 at 12:31
answered Jun 28 at 12:08
Rizwan KhanRizwan Khan
1,0851 gold badge7 silver badges27 bronze badges
1,0851 gold badge7 silver badges27 bronze badges
How you can do that in magento 2?
– anjanbarik
Jul 1 at 7:39
which js you want to take effect? is it magento default or your custom.
– Rizwan Khan
Jul 1 at 11:04
add a comment |
How you can do that in magento 2?
– anjanbarik
Jul 1 at 7:39
which js you want to take effect? is it magento default or your custom.
– Rizwan Khan
Jul 1 at 11:04
How you can do that in magento 2?
– anjanbarik
Jul 1 at 7:39
How you can do that in magento 2?
– anjanbarik
Jul 1 at 7:39
which js you want to take effect? is it magento default or your custom.
– Rizwan Khan
Jul 1 at 11:04
which js you want to take effect? is it magento default or your custom.
– Rizwan Khan
Jul 1 at 11:04
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f280084%2fhow-to-get-rid-of-browser-caching-issue-of-javascript-file-in-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You have tried versioning? mage2.pro/t/topic/3476
– Rizwan Khan
Jun 28 at 12:02
We can't add versioning in production site
– anjanbarik
Jun 28 at 12:06
You want to refresh only one javascript file when your js changes?
– Rizwan Khan
Jun 28 at 12:09
Anything will work.
– anjanbarik
Jun 28 at 12:19