Caching works too good - php

I've a problem (what a coincidence) with my website. My website is build with WordPress. To manage logins and all the stuff I'm using Ultimate Member as plugin and rebuild it. To make my website faster and enable caching, I've installed Cache Enabler.
When I login now into my website, I've the problem that when I switch for example from the account page to an other page, the other page don't knows that the user is already logined and shows an error on the page. When I press no Strg + F5 (which clears the cache and reloads the page), the content is visible.
So is there any way to clear the browsers cache after the login within PHP?

Related

Website inside iframe not working correctly

I have a Cakephp 2.3 website with a login system that works absolutely fine when accessed directly via its URL. Navigation between pages that don't required being logged in works, when you submit the login form with correct credentials it takes you to the restricted area, if you click on a link that requires being logged in the system recognizes that and takes you to the login page, etc.
However, when I load that same website from another website (using an iframe), the login system stops working. If you submit the login form, even with the correct credentials, it takes you back to the login page. If you try to access a restricted page, same thing. All this without showing any failed login errors or a "you're trying to access a restricted page" message that it shows when accessing the website without an iframe. The navigation between pages that don't require being logged in does work fine though.
The iframe code is as basic as it gets: <iframe src="https://mywebsite.com/" width="100%" height="700" frameborder="0"></iframe>
I've been dong some research and I can't figure out what's going on. I've tried enabling CORS just in case, because both websites are on different domains (same server), but that didn't make a difference. I don't have any code on the website, as far as I know, that would cause this. Both websites are loaded via https.
Any ideas of what could be going on?

Loading unsafe scripts

I am operating a vBulletin 4.2.2 forum(vbulletin.com). The issue is that whenever I save something(e.g: saving changes to edits on a user's profile / usergroup edit), the screen is blank. WHY? Because I am using HTTPS and I guess chrome detects the content as an "unsafe script". Are there any possible workarounds I can use without having to turn off HTTPS throughout the admin panel?

Improper Cache Management in joomla 2.5

The joomla 2.5.22 site allows user to go back to the browsed pages even after a
successful log out. I tried the following steps:
1. Open the page after login authentication
2. Browsed some pages and logout from the website
3. Click on Workoffline option in Firefox
4. Open the pages from the browser Cache and still some authenticated pages are opened
Is there any way to delete the browser history on logout ?
This is a security issue. how can we overcome from it? Please suggest
3. Click on Workoffline option in Firefox
It is a function of Firefox - working offline.
You can add HTTP headers, so that the page is not cached, look there for examples:
How to control web page caching, across all browsers?
U can use Firefox's Incognito window.

Cookie and session issues in php / mysql / wamp

I use wamp to develop on a windows 7 machine. For this app I have an admin area which tracks the admin username and encrypted password with $_SESSION and a cookie which keeps track of the randomly generated encryption key for the password.
I set the cookie like:
setcookie('key', $key, time()+7200, 'admin/');
The admin user verification is run on every admin page after the admin user has entered username and password details to login.
The directory structure of the site and the admin is:
localhost/mysite/
locahost/mysite/admin/
A session runs in the admin section, and a session also runs in the user interface of the front-end to keep track of chosen criteria for searches.
When I run long database queries in the admin area ie. multiple updates and inserts where each iteration requires a connection to an external API, I am unable to load the front-end user interface in the same browser ie. firefox until after the admin operation has completed. If I use a different browser ie. chrome , I am able to load the front-end of the site while running admin mysql functions with no problems.
I'd like to view the site while these operations are running, and use the same browser. It's a small problem, but I'd like to know how to get around it because I want to learn. I mean I could just tell myself that it doesn't matter because the site works fine when I open another browser, and the final user isn't going to be running admin operations while viewing the site anyway, so from that perspective it doesn't matter, but I am curious.
What is going on with the sessions and cookies that stops me from viewing the site whilst the admin operations are running? Is my question even a good one? Part of me thinks that it's a silly question because ultimately the site works perfectly well in a separate browser. Anyway, thank you for looking!
I think your session is being locked. On the page that takes a long time to run add this at the top: session_write_close(); that should fix it.

Facebook pan page caching clear problem

It seems that facebook caches fanpage , I am developing FBML application that is displayed in the fan page as a landing tab. But it is just frustrating, anyone has a solution how to clear or prevent facebook fanpage cache or any other way to work with fanpage/application development
?
There is no way to prevent the caching on FB's side but a workaround is to use an application within a tab on your fan page that uses the onclick event to load an iframe within the tab to your site, this way the content that is loaded will never be cached as it will be run from your own server.

Categories