0

I'm currently having a problem on my webpage.

The following is present on every page (including the main index.php)

<?php include 'script/header.php'; ?> 

Which point to the page with my header.php, which contains

<?php include 'popup.html'; ?>

and the popup.html contains this script, which ofcourse I didn't think of myself.

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
    function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=875,height=600,left = 50,top = 50');");
    }
// End -->
</script>

I updated the size of the pop-up it opens from 800x500 to 875x600. And this is nicely updated in the provided html code of all subpages like http://schaatspeloton.nl/rijders/ but it doesn't update on the main page http://schaatspeloton.nl where it remains at 800x500

The .htaccess doesn't have anything special in there I checked

Options -Indexes

#AddDefaultCharset iso-8859-1 AddDefaultCharset UTF-8

ErrorDocument 400 /error/400.html ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html ErrorDocument 404 /error/404.html
ErrorDocument 500 /error/500.html

And I tried including a Header unset Cache-Control in there which didn't help.

What might prevent the updating of the included popup.html from the index.php on the main page and allow it on the subdomains? And how could I force the popup.html to also be updated on the main page.

1 Answers1

0

That is not a subdomain. It's a subfolder. Huge difference. Since the include is on ALL pages (or at least you claim it is), it's calling the same file, and therefore there is nothing that should be cached or not refreshed. It's the same file being loaded, unless you have something more in the files.

Or perhaps something overrides it with CSS.

Or your browser can be broken (temporarily) - you tried closing the browser, and starting it again? And, as another also suggested, try hitting CTRL + F5 (not just F5). Also, that script is kinda horrible. Using eval() to push a popup window is a bit archaic, to say the least...

Keshan Nageswaran
  • 8,060
  • 3
  • 28
  • 45
junkfoodjunkie
  • 3,168
  • 1
  • 19
  • 33
  • I'm aware that the code is archaic (will replace it in the future, after i solved this issue). And yes I did press ctrl + F5. That doesn't help. It comes up in all different browser types and also on different – Arjen Vervoort Oct 25 '16 at 08:38
  • ... devices. I'll have a look at the CSS, but the same CSS is used for the different subfolders. So I don't expect that to be the issue. – Arjen Vervoort Oct 25 '16 at 08:40
  • I wouldn't know, actually - I don't get ANY popups, on either side, regardless of whether or not I have Ghostery on or not, or tracking protection on or off. There are several javascript-errors, though, so there might be other issues preventing the site/popup loading completely. – junkfoodjunkie Oct 25 '16 at 11:47
  • Ok, I should have better explained it then. I let several of the links open in a popup window. Not an automatic popup. On the right of the main page (on a desktop or big screen; at the bottom in smaller screens) those links are present. – Arjen Vervoort Oct 25 '16 at 12:01
  • Okay... quick look-over, and there is definitely differences - did you even look at / inspect the code? Here's the eval-line for the rijders popup: `eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=900,height=650,left = 100,top = 100');");` and here's the code from the mainpage popup: ` eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=875,height=600,left = 50,top = 50');");` As you can see, the dimensions are different. – junkfoodjunkie Oct 25 '16 at 12:19