Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

@USER_NAME not refreshing when different user logs in

Hi there,

I came across something a little odd while customizing the html file referred to in the production.conf file with the jatos.brandingUrl parameter.

I have JATOS running on a server at my institution. All working well. So I decided to try to customize the welcome screen following the instructions listed here: https://www.jatos.org/Customize-JATOS-Home-Page.html

It's all working except for one thing... in the html code, I used that provided in the example above: <h2>Hi @USER_NAME!</h2>. It does generate an output when I log in, but it displays the username first used with that browser, no matter what username I log in with. I tried with different browsers. It works the very first time I log into Jatos. From the on, it keeps displaying the initial user name unless I empty the browser's cache.

Has someone come across this problem? Is there a way to ensure that @USER_NAME is refreshed to correspond to the currently logged in user?

Not an existential query (I can always just remove the @USER_NAME code and make the page less personal), but it's bugging me so I thought I'd see if someone out there can help me.

Thanks in advance!

Fabrice.

Buy Me A Coffee

Comments

  • Hi Fabrice,

    It seems there is an issue with your customized page's cache instructions. I'm not sure if this is a general problem or just with your page. I just checked on jatos.mindprobe.org and there it works with me (at least with Chrome). Where do you host your customization page? And what is your cache header (the one called Cache-Control) of the customized page (the request is on branding)?


    Best,

    Kristian

  • Hi Kristian (@kri) ,

    Thanks for your reply! Am not super agile with the intricacies of web pages but I did manage to find the bit about cache-control and it looks like yours (this is the info when I'm logging into JATOS, it's not the info just for the html I set jatos.brandingurl to):

    I'm hosting my customization page on Github. Followed the method described under point 5.b on this page: https://www.jatos.org/Customize-JATOS-Home-Page.html (can send you the actual URL in a private message if that helps).

    If I open only the html file I have on Github (that is, the address I indicate as jatos.brandinurl in the production.conf file), I get this:

    Does that help?

    Best,

    Fabrice

    Buy Me A Coffee

  • krikri
    edited July 2021

    Now I could reproduce the problem. Before I had Chrome's Dev Tools turned on and they turned off any caching 🙄.

    I checked the JATOS' code: The cache-control header is hard coded to max-age=3600 (1 hour) for the branding response (customized home page). The reason why we set it to 3600 s is, as I remember now, to keep JATOS from doing too many requests on the host (most likely GitHub) and hitting some rate limit there (there is max amount of requests one can do for free per hour on GitHub).

    I'll try to find a solution to invalidate the cache for freshly logged in users.

    EDIT: I made a fix. Will be part of the upcoming release 3.7.1.

    Best,

    Kristian

  • Hi Kristian (@kri) ,

    Great, many thanks for your reply! 👍️

    What you're describing makes a lot of sense. I guess I only noticed 'cause I'm managing JATOS on our server over here and I was trying out user management before I have colleagues using the service. I reckon most individual users just log in as themselves on their own computer anyway, so they wouldn't notice. Alternatively, I could always

    Still, thanks for making the adjustment in the next release!

    Best,

    Fabrice.

    Buy Me A Coffee

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games