PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, February 28, 2022

[FIXED] Web server keeps using an old .js-file even after it have been removed/altered

 February 28, 2022     javascript, lamp, ubuntu-16.04     No comments   

Issue

I am using a LAMP stack web server running on Ubuntu 16.04. In my web root directory /public/ I have a few files, but the two important ones concerning my problem are:

  • index.html
  • main.build.js

The web page is a single page application. index.html "opens up" the SPA via the main.build.js, which contains the whole SPA. However, after I made changes to the main.build.js the changes does not apply to the webpage's main.build.js.

What I've tried:

  • Tried multiple browsers
  • I have tried clearing the cache & cookies of my browser(s)
  • Opening up the main.build.js that I made changes to make sure they were there (and they were)
  • Deleting the main.build.js completely (but it still shows up on the webpage!!!)
  • Restarting Apache
  • Restarting the computer

Index.html:

<html lang="en">
  <head>
    <title>BiggerWe (Alpha)</title>
    <meta charset="utf-8">
    <link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' rel="stylesheet" type="text/css">
    <script src="plotly-latest.min.js"></script>
  </head>
  <body>
    <div id="app">
    </div>
    <script src="main.build.js"></script>
  </body>
</html>

Any tips are welcome. Thanks!


Solution

According to this answered question you need to disable the PageSpeed features of the LMAP Stack and maybe the OPCache feature in php.ini by setting opcache.enable from 1 to 0



Answered By - maik-s
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing