Search Unity

Question Page not loading due to misconfigured server even after proper configuration - cache issue?

Discussion in 'Web' started by Noisecrime, Jun 6, 2023.

  1. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,054
    Hi,
    Testing out a webGL build that I put on my server. First time I tried viewing the page I got the classic
    'Unable to parse Build/webgl_r2351.framework.js.gz! This can happen if build compression was enabled but web server hosting the content was misconfigured to not serve the file with HTTP Response Header'

    Not unexpected as I didn't try to configure the server at all just hoping it might have been automatic by the hosting company. So I go and add htaccess file to the Build folder of the project, but I still get the same error.

    Important to note I'm actually testing two different webgl builds on different pages ( www.site.com/desktop and www.site/mobile ) and while the desktop index page has this error due to originally missing the configuration, the mobile index page works fine as I added its htaccess before trying to load the page.

    Additionally if I rename the page to www.site/desktop1 and try to load the index it works fine, no error!

    So the problem would appear to be the the server or more likely the browser has cached the lack of configuration for the original www.site.com/desktop index page and I can't seem to find a way to remove it.

    So my question - is there anyway to remove this cached data from the browser (Edge)/server for the www.site.com/desktop page?

    I cannot delete my entire browser cache as that would be overkill and adversely affect other sites. I tried deleting the sites cached storage, but that didn't resolve the problem. Ideally there is a simple solution for this, otherwise I guess I just have to use a different url like www.site.com/desktop1 that worked.

    Thanks


    EDIT
    Ok i'm dumb - I realised after posting this that I could just edit the index.html file and that could resolve the caching issue. It didn't, but I had the brainwave of right-clicking on the 'refresh' button in Edge and it gave several options, including a 'Hard Refresh' and that, maybe in combination with modifying index.html did the trick. It was also nice to see that you could 'Clear cache and hard refresh' too, so that might be useful for other caching issues, assuming that its the cache just for the site or page.
     
    Last edited: Jun 6, 2023