XF 1.4 Issue with config.php and CDN

Betclever

Well-known member
Hello all,

I made a subdomain and put this there => $config['javaScriptUrl'] = 'mysubdomain/js'; and add this one to the config.php file.

However, when I add this one, I have a big bug on the forum and JS doesn't load...
I have transferred JS to the root of the subdomain and tried under public_html too.
Under the CP and performances, I have checked local hosting cause the box "google API Ajax" was checked but no change...

What's wrong in this case?

Thanks for your help.
PS: I will add the data line after the JS line but the data folder is really big and I want to test first with the JS folder...
 

Attachments

  • Capture d’écran 2015-04-01 à 06.23.52.webp
    Capture d’écran 2015-04-01 à 06.23.52.webp
    12.4 KB · Views: 4
Last edited:
What happens when you go to the subdomain directly at put in the full URL of the java script? Does it actually load anything?

Nothing but the folder is empty a part the JS one.
Shall I transfer anything in addition of the JS folder?

I know, I can transfer the data folder but before transferring this one, I want to make a test with the JS one cause this one is not too heavy...

Regards,

EDIT:

It works now, I don't know why but I don't have bugs anymore.

However, can I transfer the styles folder too?
 
You need to ensure the folders are synced. So if you update the theme, you need to upload the style files to both places. Same for the JS files.
 
You need to ensure the folders are synced. So if you update the theme, you need to upload the style files to both places. Same for the JS files.

Hum ok, good to know.
However, I got another question:

If I made this subdomain and moving some folders to the subdomain, it is to optimize my website and the loading page.
Therefore, is it a good way to use my own subdomain and not a website like cloudfare or something like that?

I have changed to local hosting instead Google API Ajax under performances.
 
It depends. How fast is your server? A proper CDN would in theory be better, as it would serve the content from a node closest to the end user. However, from my own experience, I've always found it slower than my own server.

Having them on your own subdomain isn't going to make much difference, because it's still on the same TLD. Ideally, you want it on a different TLD which will make it cookieless.

In my own case, I had the forums at mattwservices.co.uk and the static content served from mattwservices.uk
 
It depends. How fast is your server? A proper CDN would in theory be better, as it would serve the content from a node closest to the end user. However, from my own experience, I've always found it slower than my own server.

Having them on your own subdomain isn't going to make much difference, because it's still on the same TLD. Ideally, you want it on a different TLD which will make it cookieless.

In my own case, I had the forums at mattwservices.co.uk and the static content served from mattwservices.uk

Ah ok, I have a VPS with 3 cores, 30gb data stockage "SSD" and 3gb ram and traffic and hits unlimited for 44,99€/month.
I got another question, I did the same for the data folder but the CSS doesn't load, any reason?

I used the same CDN address => $config['externalDataUrl'] = 'http://cdn1.bet-clever.com/data';

I have copied this one to the subdomain too under public_html

Thanks for your help.
 
Top Bottom