NetTalk Central

Author Topic: Working with CSS and Server Restart  (Read 4306 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1871
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Working with CSS and Server Restart
« on: May 01, 2020, 08:34:26 AM »
May be its me, may be is there another way to do it.
I have a custom.css, if I make changes to it I need to close the server and re run it to see the changes, besides the obvious Ctrl-F5 in the browser.
Is there any chance of make this CSS refresh of the server clicking in the actual "Restart Server" of the server settings tab?
Thanks
-----------
Regards
Alberto

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: Working with CSS and Server Restart
« Reply #1 on: May 01, 2020, 10:12:46 AM »
si tienes configurado el sistema en el webserver performance como web hay que cerrar y abrir ya que va todo comprimido, como debug no.

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Working with CSS and Server Restart
« Reply #2 on: May 01, 2020, 02:45:02 PM »
Hi,

I turn off "Enable File Cache" while i'm actively developing. This means I dont have to restart the server to clear the file cache.

You also either have to turn off "Combine Common Files" to remove the need to re-combine and compress resources (styles & scripts) each time you make a change OR  you can add your own .CSS and .JS files into NT, just remember it is ok for us in development to have the press Ctrl-F5 but this is not satisfactory when in production (you can't tell hundreds or thousands of customers to do this). In this case a common technique is to place a version or random number as part of the css or js filename.

In my example move.js?v=2.29 as shown in the attachment.

As long as I change the version all clients browsers will reload the file.

Regards
Bill

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Working with CSS and Server Restart
« Reply #3 on: May 02, 2020, 04:08:11 AM »
yeah, the short answer,
a) on template settings, Performance tab - click the "Debug" button.
b) when editing in the browser just refresh the page normally between css changes. No need to restart the exe.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1871
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Working with CSS and Server Restart
« Reply #4 on: May 02, 2020, 04:35:47 AM »
Yes but... if I press the Debug button nothin works, the server compiles ok but nothing in the page works, I have to do it manually.
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Working with CSS and Server Restart
« Reply #5 on: May 03, 2020, 12:06:29 AM »
>> Yes but... if I press the Debug button nothing works, the server compiles ok but nothing in the page works, I have to do it manually.

Well that definitely needs to be sorted out before you continue.
So when you are in "debug" settings,
Ctrl-F5 in the browser - just to be sure the cache is cleared
and check the developer tools Console for errors.

There is no point in continuing until this is sorted out.

cheers
Bruce


Alberto

  • Hero Member
  • *****
  • Posts: 1871
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Working with CSS and Server Restart
« Reply #6 on: May 03, 2020, 04:39:05 AM »
Works ok now, dont know what happened.
Thanks
-----------
Regards
Alberto