Skip to main content
Level 2
Jan 4, 2022 6:11 AM UTC
Question

Cache issue with external JS Code.

Hi Team,

 

I am able to see "Cache issue with external JS Code".

 

How we can minimize creating the new JS code every time we change something inside code.

 

Note : We can reuse same JS code if any changes required instead of creating new one.

 

Please provide your thoughts to fix this cache issue with external JS code.

 

Thanks,

Gangadhar

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

7 replies

ShrawanSaxena-1
Adobe Employee
Adobe Employee
Jan 4, 2022 8:56 AM UTC

Hi Gangadhar,

Could you please provide more details on what error you are getting when referring to "Cache issue with external JS Code"?"

Translate
Milan_Vucetic
Level 9
Jan 9, 2022 12:28 PM UTC

Hi @gangadhar_reddy1 

if you want to disable cache within JSSP pages in AC you can use the following:

        // Setting headers to disable cache
        response.addHeader("Pragma", "no-cache")
        response.addHeader("Cache-Control", "no-cache");
        response.addHeader("Expires", new Date().toGMTString());

Regards,

Milan

Translate
Level 2
Jan 18, 2022 9:48 AM UTC

Hi Milan,

 

Thanks for providing the dynamic java script code. But this code is not working.

 

Please provide me the Java script code instead of dynamic java script code to fix the cache issue with external JS code.

 

Thanks,

Gangadhar

Translate
Sukrity_Wadhwa
Level 4
Jan 13, 2022 10:43 AM UTC

Hi @gangadhar_reddy1,

Were you able to resolve this query or do you still need more help here? Do let us know.

Thanks!

Translate
Sukrity Wadhwa
Level 2
Jan 18, 2022 10:59 AM UTC

Hi Sukrity,

 

Please provide me the Java script code to fix the cache issue with external JS code.

 

Thanks,

Gangadhar

Translate
Sukrity_Wadhwa
Level 4
Jan 19, 2022 8:35 AM UTC

Thanks for letting us know. I will amplify your query among our SMEs and try to get the help you need. 

-Sukrity

Translate
Sukrity Wadhwa