0

welcome. I made an experiment project to check (laravel-with-vue) and uploaded it to Heroku. But the screen appears blank and when checking the item it appears:

    <body data-new-gr-c-s-check-loaded="14.1012.0" data-gr-ext-installed="" cz-shortcut-listen="true">
    <div id="app">
        <app></app>
    </div>
    <!-- Scripts -->
    <script src="http://blogy-new.herokuapp.com/js/app.js"></script>
    </body>

And this website for more details: https://blogy-new.herokuapp.com/

But on localhost it works fine: enter image description here

in heroku : enter image description here

1 Answer 1

1

Your problem is super straight forward to fix, if you check the chrome console, you will see this error:

Mixed Content: The page at 'https://blogy-new.herokuapp.com/' was loaded over HTTPS, but requested an insecure script 'http://blogy-new.herokuapp.com/js/app.js'. This request has been blocked; the content must be served over HTTPS.

It is saying that you are asking for your js file using HTTP, but your page is HTTPS, so you have to rewrite your js file URL to HTTPS and it will be fixed:

<script src="https://blogy-new.herokuapp.com/js/app.js"></script>

It is working in your localhost because it is HTTP.

Sign up to request clarification or add additional context in comments.

2 Comments

when I use " blogy-new.herokuapp.com ", it is working, thank you, for answering my question
Be careful that "blogy-new.herokuapp.com" goes to http and not https. If you want to add a script, try always to be absolute without the domain. A better solution to your problem would be to use src="/js/app.js" and it will automatically use correct protocol and domain...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.