The rally in tech stocks Thursday could lead to a longer-term recovery, as the beaten down names struggle to stay afloat in a seesawing market.

If you look at companies that provide new life to the enterprise, even as the consumer side still looks pretty ugly, you need to realize that tech could have more than just a temporary bounce.

The rest of the tech sector was higher on Thursday, thanks to a 21% revenue leap that pushed chipmakers and the rest of the technology sector higher. The shares of both companies rose. ON Semiconductor increased in price by more than 9%.

The Russia-Ukraine war, Covids in China, and the Federal Reserve's series of interest rate hikes were some of the casualties of the rally. Cramer thinks the tech sector could see a sustained recovery even if the economy goes into a recession.

I don't understand why tech has staying power. First, the Chinese consumer might be coming back, but second, the enterprise isn't getting as weak as you would normally expect in a Fed-mandated slowdown," he said.

There was an increase in Covid cases in China last month and the country shortened itsQuarantines for international travelers. Bank of America Securities acknowledged that the rebound in Covid cases could lead to some volatility, but said it doesn't expect China to return to an extended lock down like it did in the second quarter.

Tech companies' products and services are not limited to laptops and home office equipment, Cramer said. Demand for technology companies' services could be increased during an economic downturn.

The tech industry is deflationary. People with new technology can be laid off. Technology makes it possible to figure out how to make things cheaper. Better products can be made with more technology. He said that all of this is happening right now.

Cramer's Charitable Trust has shares of two companies.