Thread Tools Display Modes
Old 01-03-2020, 10:22 AM
Chudri 420's Avatar
Chudri 420 Chudri 420 is offline
Junior Member
Join Date: Jan 2020
Posts: 1
Default How to force refresh each page in rails

I can't seem to figure out how to turn of the cache successfully in my rails app. The website I made is and upon using the navbar to click to the clothing page, the clothes do no appear unless you refresh the page once you are on it. As well, when navigating back to the homepage, the Javascript to get the text to fly in does not appear unless you refresh the page as well.

I am pretty sure this is a cache problem but if any one has some ideas, I would really appreciate it. I have gone in the config file and changed the rails cache to false.


here is the javascript

var pausebetweenmsg=10 //customize pause in miliseconds between each message showing up
(3000=3 seconds)
var glidespeed=50 //customize glide speed in pixels per frame.

var curobjindex=0

function actualstyle(el, cssproperty){
if (el.currentStyle)
return el.currentStyle[cssproperty]
else if (window.getComputedStyle){
var elstyle=window.getComputedStyle(el, "")
return elstyle.getPropertyValue(cssproperty)

function collectElementbyClass(){
var classname="glidetext"
glidearray=new Array()
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
if (glidearray.length>0)

function onebyoneglide(){
if (curobjindex<glidearray.length)

function glideroutine(){
if (parseInt(actualstyle(glidearray[curobjindex], "left"))<0)
glidearray[curobjindex].style.left=parseInt(actualstyle(glidearray[curobjindex], "left"))+50+"px"
setTimeout("onebyoneglide()", pausebetweenmsg)

if (window.addEventListener)
window.addEventListener("load", collectElementbyClass, false)
else if (window.attachEvent)
window.attachEvent("onload", collectElementbyClass)
else if (document.getElementById)
This send the text flying onto the page from the homepage that is not working when navigated to from another page. You have to refresh the home page as well.

As for the clothing javascript, that is handle by ecwid. I will update once I can locate the specific javascript that is being used by them.
Old 01-05-2020, 06:48 PM
Ksenia Avdonina's Avatar
Ksenia Avdonina Ksenia Avdonina is offline
Ecwid Team
Join Date: Jul 2019
Posts: 16

This is Xena, Ecwid Customer Care team. Thanks for your message!

I've checked your website: and see that the store is indeed displayed only after refreshing a website page.

I've saved your store page locally as an HTML file and should say that the issue wasn't reproduced as the store was displayed just fine. Here is the video showing this:

I've also inspected the browser console and see that there are errors connected to the JS script of one of the website elements, screenshot:

In this case, I'd recommend that you check your website script as it seems as if some of its elements overlaps the storefront code and which is why it is displayed only after refreshing the page.

Moreover, make sure that your Ecwid store is added correctly. Just in case, here is the instruction on how to embed Ecwid to a custom website:

If you have any other questions, please feel free to contact us.

Ecwid Customer Care team
Old 01-30-2020, 11:11 AM
RuskinF's Avatar
RuskinF RuskinF is offline
Junior Member
Join Date: Jan 2020
Posts: 9

I checked your page now and it didn't have any problem.
Everything loaded correctly and nothing changed after refreshing the page.
Are you still facing a problem with your website?
Old 08-12-2020, 03:23 AM
alberthines's Avatar
alberthines alberthines is offline
Junior Member
Join Date: Aug 2020
Posts: 1

This solved my problem. Thanks.

8 ball pool

Last edited by alberthines; 11-19-2020 at 08:31 AM.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 02:55 AM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.