in Education by
User visits subdomain1.mydomain.com, which sends back cache-control (public, max-age=86400) instructions in its response, which means the CDN and browser cache it. These instructions are only sent for logged-out visitors. User visits subdomain2.mydomain.com, and logs in. The login cookie is an http-only mydomain.com cookie, valid for both subdomains. User navigates back to subdomain1.mydomain.com to visit the previously visited page, and unfortunately gets the logged-out version of the page since it is browser-cached. What's the cleanest way to have #3 skip the browser cache? This is also an issue when someone clicks the back button (from subdomain2 to subdomain1). The cookie is http-only so we can't have client-side javascript check for the presence of the cookie. We also need that cache-control instruction (or something like it) for the CDN (Akamai). We could possibly then have Akamai send altered cache-control instructions to the browser, maybe no-cache? I've also heard about Vary: cookie but I mostly see warnings not to use it. It's as if I want the browser to serve from browser cache unless a certain cookie exists. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
i recommend you localstorage instead of cookie as it is more powerful then cookie so if you use localstorage then you will achive this one otherwise no you can achive your goal like this if(localstorage.getItem("item-name")==null){ // code to handle }

Related questions

0 votes
    User visits subdomain1.mydomain.com, which sends back cache-control (public, max-age=86400) instructions in ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 2, 2022 in Education by JackTerrance
0 votes
    Which of the following data is not appropriate here, if you delete cache, cookies, and browser history? (a ... -for-Cyber Security:,Cyber Security-Jobs:,Cyber Security Applications...
asked Oct 31, 2021 in Education by JackTerrance
0 votes
    Which of the following in a cache address, specifies the exact location in the cache line where the requested data exists? (a)Block Number (b)Block Offset (c)Block Index (d)Tag...
asked Oct 6, 2020 in Technology by JackTerrance
0 votes
    Background I am writing and using a very simple CGI-based (Perl) content management tool for two pro-bono ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    Background I am writing and using a very simple CGI-based (Perl) content management tool for two pro-bono ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    Issue I work a lot with stylesheets, I change something and I check how it looks. However most if ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    Issue I work a lot with stylesheets, I change something and I check how it looks. However most if ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    How can we skip the bad records in Hadoop?...
asked Aug 5, 2021 in Technology by JackTerrance
0 votes
    I've got a table of URLs and I don't want any duplicate URLs. How do I check to see if ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 29, 2022 in Education by JackTerrance
0 votes
    Is it possible to confirm if a place name exists for a specified coordinates via PHP? In other words, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    Is it possible to confirm if a place name exists for a specified coordinates via PHP? In other words, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 17, 2022 in Education by JackTerrance
0 votes
    In the os module in Python, is there a way to find if a directory exists, something like: os.direxists(os ... in pseudocode True/False Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    What is the Git command to skip staging and commit the changes directly? A. git skip stage B. git commit C. git commit -a -m “message” D. git add changes...
asked Dec 21, 2022 in Technology by JackTerrance
...